Box2D Benchmarks Show Everything Is Getting Faster
Written by Ian Elliot   
Tuesday, 10 June 2014

The browser is the logical platform for development, but making it as fast as the desktop is key in making it a viable platform. A new set of benchmarks gives us an idea of how well things are progressing. Is JavaScript getting close to native?

Joel Webber ran some benchmarks using Box2D last year and he has just repeated the task with some interesting results. 

Taking the C implementation as the standard you can see how fast the others go by comparison. The two that are probably of most interest are pNaCL and asm.js running on Firefox. These represent Google and Mozilla's attempts to make browser apps work as fast as native apps.

Given that pNaCL is closest to C in the browser, its performance ratio of 1.22 isn't so surprising. But asm.js is closer than you might think at 1.51. What is also surprising is that asm.js on Chrome scores 2.54 and on IE11 4.46, but on Safari 7 it scores a terrible 127. Perhaps it is good news, that Apple recently announced speed improvements on Safari 8.

Notice that on Chrome, IE and Safari, asm.js has no special optimizations as it does on Firefox and so these figures represent the sort of performance raw JavaScript manages. Put another way, Firefox improves on Chrome's 2.54 to 1.51 by optimizing asm.js.

Moving beyond JavaScript, the results also show that Java at 2.67 is faster than Dart running in the browser (Dartium) at 5.05, which is a lot faster than Dart compiled to JavaScript 14.3.

Compared to last year's results just about everything has improved with the biggest improvements in the slowest performers. 

The full results are summarized below:

box2dbench

Source: as simple as possible, but no simpler blog

You can find all of the data on Joel's web site along with many interesting interpretations and comments.

What is immediately apparent from the chart however is that pNaCl and asm.js are the two to watch and the two technologies to consider if you want to create in browser apps - but notice that only asm.js works on all browsers. 

Banner


Interact With Virtual Historic Computers
14/04/2024

Alan Turing's ACE computer is a legendary computer that is particularly special for I Programmer - our account of it was the first ever history article on the site when it launched in 2009. Now this i [ ... ]



Apache Shiro 2.0 Released
21/03/2024

Apache Shiro 2.0 has been released. The Java security framework now requires at least Java 11, and has added support for Jakarta EE 10.


More News

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

 

 

 

 

 

Last Updated ( Tuesday, 10 June 2014 )