Apr 8, 2010 09:56 GMT  ·  By

With all modern web browsers battling over JavaScript performance, there is a need for ways to reliably measure it. One benchmark that has proven very popular is SunSpider, created by the Webkit team. The benchmark is regularly used to compare various JavaScript engines, but, with things moving so fast in this area, it started being less reliable on fast machines. The team has implemented several changes to address these issues and has integrated them in the newly released SunSpider 0.9.1.

The first SunSpider benchmark was released just two years ago. It may not seem like a long time, but plenty have changed since then and JavaScript engines are several times faster. The arm race began when Google launched Chrome and, since then, all the major players, Firefox, Safari, Opera, have revamped their JavaScript engines. A great example consists of the actual SunSpider results. When it first launched, most browsers and machines completed it in about 10,000 ms, but today's browsers can do it in 300 ms.

This led to an unforeseen issue that affected most modern PCs. "By design, the SunSpider harness has significant pauses between each test, to give browsers a chance to settle down after the load. But with fast browsers on modern hardware, this gives enough time for power management to kick in and ratchet down the CPU clock rate. As a result, most of the benchmark does not run at full speed," Maciej Stachowiak from the Webkit team explained. The faster the JavaScript engine, the more it is likely to be affected by this issue.

With SunSpider 0.9.1, the problem is gone. The time between the tests has been greatly reduced and the benchmark content is now loaded ahead of the tests rather than between them. This should make the benchmark more accurate, as it eliminates problems like the Internet connection speed, which may have affected the results. And the best part is that the benchmark is completed a lot faster since the half-a-second delay has been eliminated. A couple of bugs affecting specific platforms have also been fixed and the test content has been slightly changed. You can check out the brand-new SunSpider 0.9.1 benchmark for yourself here.