Everyone has been working quite hard lately to get rid of allocations. I’d like to call out jst, sicking, smaug, dbaron, brendan, igor, and crowder for their help, patches and suggestions over the last few weeks.
Just looking at our startup allocation test, we’ve removed about 100,000 allocations. Other tests show far, far bigger gains.
We’ve been very successful in converting quite a few heap allocations to use small stack buffers instead. We’ve found places where we didn’t need to do any allocation at all and just removed them. Many of these improvements have come in our DOM and XPConnect code which not only helps reduce fragmentation but also results in performance gains for sites with lots of DOM access (not to mention our UI!). We’ve also gotten startup speed improvements.
We’ve got more things in the pipeline so I expect this number to continue to drop.