I did a simple jsperf test and everything went as expected when it worked in Firefox, but when I ran the test in Google Chrome, it was confused.
The test tests various ways of declaring a function in JavaScript and then calls them. I assume that Chrome is doing some kind of optimization for the JavaScript function, but I'm not sure if and why there is such a big difference. Any help or links to understand this are best appreciated.
Link to test => http://jsperf.com/function-assignment-semicolon/2
Test in Firefox:

Test in Chrome:

Edit:
I expected results from Firefox because I expected them to be - the same for each test - slower than when launched in Google Chrome
performance javascript browser jsperf
Mike Grace Dec 09 '10 at 8:03 2010-12-09 08:03
source share