Having recently done some benchmarking of my own code, and from simply running the browsers side-by-side a fair bit, this doesn't surprise me a bit. Firefox 4 consistently comes out 3x slower or worse than Chrome/Safari (I don't have Opera handy). I keep seeing claims, I keep seeing benchmarks, but I've never been able to replicate their results with any code I've written. Significantly faster than FF3, don't get me wrong, but they've still got a fair distance to go if they want to claim faster-than-WebKit.
I quite like this benchmark setup. Real-world results, split by display time. Nice writeup!
It really depends on the benchmark. On the official ones FF4 does very well, on yours apparently it doesn't, ditto the one in the article.
There is little meaning to general statements at this point, when all the major JS engines are quite fast. It really depends on the benchmark. It would be easy, for example, to show a benchmark where FF4 is faster than Chrome, but again, it would prove nothing.
Benchmarks, especially the big ones, are targets for improving JS engines, while cases they don't cover may not get as much attention. The "official" ones should always be taken with a gigantic grain of salt. Especially as I believe I read that Mozilla's in-the-works engine is experimenting with making optimizing transformations of JS code to improve its speed, where none of the others do because it breaks from the spec, or some such argument.
What operating system are you on and what build of Firefox 4 are you running? I am using the nightlies on Arch Linux x64 with kernel 2.6.36.
edit:
Most of my testing involves jQuery DOM manipulation, and benchmarking some DOM-free, stratght JS utility code / mini-libraries I've written, and one moderately-large one in the works. Because that's what I'm writing. Real benchmarks trump more scientifical benchmarks, for my purposes. YMMV, absolutely, these are just my outcomes.
For a specific case, changing a callback-based array iteration to a for loop, totalled after 10,000 empty operations (making it do something and accounting for that code showed almost no difference):
Chrome 9: <1ms difference
5ms average after change
On FF4b7: 15ms difference
15ms average after change (note that this means it was ~30ms before, a full 6x slower than Chrome)
On FF3: 40ms difference
51ms average after changeNow I'll say the web turns your computer into an IBM 3070 with a TRS-80 under the hood.
Slightly more impressive but yes, it's strange we all get so excited about performance improvements that can only be called less mediocre than the previous iteration.
I'm interested to see what changes with the 4.2 OS soon to be released.
I'd like to see that, too. I wrote Peter an email to ask if he'd gotten a chance to do that.
I didn't mention in the article, but I have run the emulator on the Wii's Opera browser and the PS3--both slow but the Wii is much faster. The XBOX360 hasn't heard about the WWW yet.