And now for something completely different.
My past as a Commodore 64 demo programmer means that I find benchmarks quite irresistible. What is the fastest way to accomplish a given task?
Following Steve Jobs’ denunciation of Flash as slow, Sean Christmann recently posted his Guimark2 test suite for comparing vector, bitmap, and text rendering across platforms. Sean built Flash and HTML versions of the tests. One of the clear results was that HTML5 just isn’t that fast yet.
But being mostly a Java programmer, I couldn’t help building Java versions (perhaps I wanted to counter the perception that Java is slow). You can try the Java tests here, Vector, Bitmap, Text and compare them to the tests on the Guimark2 page.
Here are the results from the two machines I tested on:
Test/OS | XP, HTML | XP, Flash | XP, Java | OS X, HTML | OS X, Flash | OS X, Java |
---|---|---|---|---|---|---|
Vector | 11.9 | 21.9 | 20.7 | 4.5 | 19.8 | 31.9 |
Bitmap | 4.3 | 12.7 | 208.2 | 13.0 | 12.9 | 42.0 |
Text | 19.2 | 1.5 | 11.4 | 29.9 | 16.6 | 14.1 |
Test results in Frames Per Second (Higher is better)
As you can see, on my two test machines, the Vector test is fastest in Java on OS X, the Bitmap test is fastest in Java on XP (5 times faster than any other platform/language), and the Text test is fastest in HTML on OS X.
Is this always the case? No. As can also be witnessed on the Guimark2 page, these results are highly variable between different OS configurations, browsers. As far as I can make out, really high Java bitmap scores require an ATI or NVidia graphics card, and may not always be present on Windows Vista or 7. On OS X, Flash runs faster in 32-bit Safari, while Java runs fastest in 64-bit Safari (tested here). And so on.
Benchmarking is a lot more complicated than it used to be, but I just thought I’d share these results. The tests also link to the source code if you are interested. Feel free to post your results here or on the Guimark2 page.
PS. Test machines:
- 2007 Lenovo ThinkPad T60p running Windows XP, Firefox 3.6, Java 1.6, Flash 10.
- 2010 15″ MacBook Pro running Snow Leopard, Safari (64-bit), Java 1.6, Flash 10.