Mozilla Firefox JS engine Januari 2012

There are again a lot of improvements in the JavaScript engine in Mozilla Firefox. Here I will list the speed improvements and regressions happened in the month Januari. This time with three benchmarks. They are know as sunspider (a popular benchmark released by WebKit), V8 (released by google) and jslinux (a pc emulator running linux). The improvements will eventually come into Firefox 12 together with the improvements of the last week of December.

Current JS engine (Jaegermonkey + Type Interference)

Benchmark   December 31st   Januari 26th
jslinux      5306.0 ms         4596.0 ms   improvement of 15%
V8           7196.6            6953.4      regression in score of 3.5%
sunspider    165.87 ms        167.445 ms   regression of 0.1%

The biggest difference is the huge improvement on the jslinux benchmark. This is like Bhackett promised due to  landing of bug 706914. This compiles scripts in smaller chunks. This way the compilation time gets decreased.

Detailed overview
Note this list just gives an indication what revisions/bugs potentially increased/decreased performance. It could be that I’ve listed bugs that actually don’t give the listed speed-up and there could be revisions that have a huge influence on the speed, but that I failed to list here.

be81e5f7850f – Bug 714218 – Specialize some get* implementations to do property-type-specific handling, with their getGeneric forwarding to the appropriate specific implementation.
sunspider: regression of 0.8%

db8ea6327311 – Bug 607692 – Inline parseInt(, <0|10>) in JM.
sunspider: improvement of 0.5%

23f3b97f655a – Bug 710163: (part 2) fix EXT_context_loss semantics.
sunspider: regression of 0.4%

faf5f8842fec – Bug 703157 – Don’t modify dictionary shapes in place.
sunspider: improvement of 0.5%

78d17e22a223 – Bug 712714 – Remove JOF_CALLOP.
sunspider: regression of 0.6%

e12b877ae637 – Convert a couple always-true appends to infallibleAppend, since that’s what they should have been using
sunspider: improvement of 1%

d0c192e5bd41 – Bug 706914 – Compile large scripts in chunks.
jslinux: improvement of 17.4%
Huge improvement and indeed fixes the regression introduced last month by compiling switch and try blocks.

96a9dffede07 – Bug 717494 – Pass scope chain explicitly to FindProperty
jslinux: improvement of 0.7%

a85cf7f0d235 – Bug 716512 – make sure that gcparam in shell cannot set MAX_GC_BYTES to a value les than the current GC_BYTES.
V8: improvement of 0.8%

7ab4f1ebc7cc – Backout 54cd89b0f1fa (Bug 712714 backout). Talos will probably report fake regressions for this patch, do not back out for this reason.
V8: regression of 2.5%
Note: Like the commit message already states, this could be a fake regression. But I’m not sure. Every timing I do, shows this is a regression …

Mozilla Firefox JS engine December 2011

In this post I want to iterate over the performance improvements and regressions of the javascript engine in Mozilla Firefox. I will do this by building the cutting edge JS shell of Mozilla. (I use the branch mozilla-inbound). The improvements will not be visible in Firefox immediatly. The improvements that happened before December 23th will go in Firefox 11. The rest will go into Firefox 12.

Current JS engine (Jaegermonkey + Type Interference)

Currently the JavaScript Engine in Firefox uses JaegerMonkey and Type Interference. While JaegerMonkey is relatively old, Type Interference is rather new. Type Interference got enabled only in the newest version (FF 9).

Benchmark    December 1st    December 31st
jslinux         5298.0 ms    5476.5 ms     regression of 180 ms
V8              6811.7       7113.4        improvement in score of 300

One of the regressions I found was the following one:
eaac85c4c05f – Bug 704387: Generate SSA information for scripts containing switch and try blocks
regression of 130ms on jslinux
This increases the compilation time of scripts, with the possibility of creating faster code. In case of jslinux the gained run time doesn’t outweight the extra compilation time and therefor runs slower. Bhackett informed me that the increased compilation time will get lowered with help of bug 706914.