The competition between browsers in the area of Javascript performance has led to some pretty dramatic performance increases in the last couple of years. A lot of this has been accomplished through Javascript just in time (JIT) compilers. What JITs do is convert the Javascript into native instructions which execute a lot faster than more abstract forms. The one downside to this approach is that each native architecture must be supported to get the speed boost.
If you follow Javascript performance you know that recent versions of Firefox have a JIT. What you may not know is that there is no JIT in Firefox for x86_64. This isn’t that big of a problem for Windows since there are so few 64-bit windows users but Linux distributions have been native 64-bit for quite some time. So if you’ve installed a 64-bit version of your faviourite Linux distribution you are getting far slower Javascript performance in Firefox than if you had installed the i686 version. How much slower?
The following benchmarks were executed on an i7-930 running Fedora 12, Firefox 3.5.8 and Epiphany 2.28.2. The benchmarks I used are the SunSpider and V8 Javascript benchmarks.
Browser/arch | V8 (higher is better) | SunSpider (lower is better) |
Firefox i686 PAE | 402 | 1002.6ms |
Firefox x86_64 | 277 | 2131.2ms |
Epiphany x86_64 | 887 | 1261.0ms |
These results show that the Javascript performance of i686 Firefox is a lot better than x86_64. The Epiphany web browser is based on Webkit which, based on these results, I’m guessing does have a x86_64 JIT.
There are going to be a lot more 64-bit Windows users in the future, I suspect. A lot of people I know who are getting Windows 7 seem to be opting for the 64-bit version. Unlike Vista, driver support for it seems fairly decent. I imagine a 64-bit JIT is on it’s way, tho.