My JavaScript book is out! Don't miss the opportunity to upgrade your beginner or average dev skills.

Friday, August 14, 2009

Defeat Internet Explorer - Can You?

While I was creating a stand alone implementation of the LSSP described in my last HTML5 sessionStorage project, I did some test and bench as every Agile developer should do.

Well, what I have discovered, is that apparently Internet Explorer could perform some common task better than any other browser, at least in my good old Intel Centrino 1.6 Ghz.

I have created a benchmark page able to freeze my Firefox 3.5.2, to ask me if I would like to continue an Array.join execution with an average score that points out my Internet Explorer 8 wins with a score under 300 milliseconds against Chrome, Firefox and Safari.

As summary, is my Centrino dead or there's something we all did not consider about JScript engine?

P.S. Opera 10 beta 2 seems to score about 130 milliseconds as average, good stuff!

5 comments:

Andrea Giammarchi said...

from tchvil
easy defeat on a brutish quad xeon -> FF3:92 - Opera9:104 - Safari4:183 - IE8:580

Andrea Giammarchi said...

well, I guess it IS my centrino! Any other test with "daily used CPU"?

Andrea Giammarchi said...

... er .... tchvil, it does not make sense your CPU scored less than mine with IE8 ... where are you? Linux and Wine or an official Windows distribution?

Mic C. said...

This was not fair... OK.
It was with a WinXP on VirtualBox over OS X.

But now with all browsers on the same XP/Vbox it gives something else:
IE:570, Chrome:235, FF3.5:9426

Bed time here, too late to try to understand where all those contradictions come from ;)
Cheers,

PhiSYS said...

Weird behavior? 0 msec?:
Firefox:
Array access plus Math.random plus String.fromCharCode: truly common operations: 5 milliseconds

A join operation over an Array with length 10000 and a resulted string of 50005000 bytes: 11596 milliseconds

A common += operation over a big string: 281 milliseconds

A slice operation over a big string: 0 milliseconds

An indexOf operation over a big string: 79 milliseconds

Do You still think Internet Explorer is THAT slow?
Average Elapsed Time: 2392.2 milliseconds

IE8:
Array access plus Math.random plus String.fromCharCode: truly common operations: 31 milliseconds

A join operation over an Array with length 10000 and a resulted string of 50005000 bytes: 828 milliseconds

A common += operation over a big string: 0 milliseconds

A slice operation over a big string: 187 milliseconds

An indexOf operation over a big string: 172 milliseconds

Average Elapsed Time: 243.6 milliseconds

Using 2GHz Turion64 Laptop (WinXP)