I'm curious whether the performance varies if you used a C compiler from the last five years -- GCC 4.2.1 was released in July 2007. (I'm not claimed the author of the post is unfairly biasing the results, I'm just honestly curious.)
FWIW, I just ran it through Clang 4.1 (the standard on XCode these days), and got roughly identical performance. I'm still compiling gcc 4.8 just to be sure, but it seems unlikely to make much of a difference.
Good point. Apple helpfully reports the rather confusing version string "Apple clang version 4.1 (tags/Apple/clang-421.11.65) (based on LLVM 3.1svn)" :P
Interesting how JS still doesn't live up to AS3. Everyone always discredits Flash... but if you're trying to make a Physics-based browser game, it still seems appropriate!
Well, the asm.js version of the benchmark is JS, and it outperformed AS3. Although as cpleppert said, perhaps an alchemy version for Flash would be faster than AS3, that would be interesting to see.
But, I'm not aware of an alchemy version of Box2D for Flash that is convenient to use from normal Flash (what presumably the rest of the game is written in), while for asm.js there is such a version (that is easily usable from normal JS), here's a demo
You could get even better performance if you directly coded against the alchemy VM instructions or used alchemy directly. This would be comparable to asm.js or coding Java against the unsafe memory operators.
For asm.js to be 90% slower than c++, it would have to run at 10% the speed of c++, not 51% of its speed, which is what the data shows. 100% slower is not 1/2 the speed, it's no speed at all.
Take some speed x. Increasing it by 100% gives 2x. Decreasing it by 100% gives zero.
Expressed another way, 100% of x is x. Add 100% = 2x, Subtract 100% = zero. The original claim is "90% slower." Clearly the OP either meant 51% slower or 49% slower, depending on how one reads it.
a = 2.62
b = 5.19
a / b = 0.5048, or 50.48%: "b has 50.48 percent the speed of a".
EDIT: wow, once again downvoted for being right and proving it.
English conventions are inconsistent. "X is 2x slower than Y" usually means that Y runs at twice the speed of X. Since 90% = 0.9, "X is 90% slower than Y" would mean that X is actually faster than Y. Therefore it's better to state it in an unambiguous way, e.g. X took 2x as much time as Y, or just look at the numbers directly.
You can grab his repo and try it yourself, but as I commented on the blogpost, on my machine I see firefox without asm.js optimizations and chrome as being about the same speed, both of them are half the speed of firefox with asm.js optimizations. (I don't have a machine with safari to test on.)
Which means the asm.js version is faster than other JS versions, even without specific asm.js optimizations.
It looks like Farseer is based on Box2D, but extended, so it makes a kind of sense. I suspect the .NET VM performance will be somewhere around what the JVM gets, so it shouldn't be too much of a surprise.
I must admit to being unfamiliar with Farseer, but if you feel like submitting a pull request, I'll figure out a way to run it on my Mac (I presume the "platform" you're referring to is .NET, or perhaps WinMo).