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.)
To answer my own question, I got: gcc 4.6.3: 3.554688 +/- 4.786550 clang trunk: 3.593750 +/- 4.798172 Chrome: 41.03515625 +/- 9.331709130062185 Which puts Chrome at about 11x these native compilers, consistent with the blog post.
Box2d Revisited
11–20 of 44 posts
Re: Box2d Revisited
#12Re: Box2d Revisited
#13I'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.)
To answer my own question, I got: gcc 4.6.3: 3.554688 +/- 4.786550 clang trunk: 3.593750 +/- 4.798172 Chrome: 41.03515625 +/- 9.331709130062185 Which puts Chrome at about 11x these native compilers, consistent with the blog post.
Re: Box2d Revisited
#14Interesting 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!
Re: Box2d Revisited
#15Interesting 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!
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
http://kripken.github.io/box2d.js/webgl_demo/box2d.html
So comparing currently usable versions of Box2D, the fastest JS one (the asm.js one) is faster than the fastest Flash one.
Re: Box2d Revisited
#16Earlier quoted context omitted.
To answer my own question, I got: gcc 4.6.3: 3.554688 +/- 4.786550 clang trunk: 3.593750 +/- 4.798172 Chrome: 41.03515625 +/- 9.331709130062185 Which puts Chrome at about 11x these native compilers, consistent with the blog post.
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.
Clang 3.3 will be released soon.
Re: Box2d Revisited
#17Earlier quoted context omitted.
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.
There's no Clang 4.1, though. You probably mean "the Clang that comes with version 4.1 of XCode"? Clang 3.3 will be released soon.
Re: Box2d Revisited
#18I can't zoom on this page with my phone and, due to that, can't read it at all except with the "Reader" function.
Re: Box2d Revisited
#19I'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.)
To answer my own question, I got: gcc 4.6.3: 3.554688 +/- 4.786550 clang trunk: 3.593750 +/- 4.798172 Chrome: 41.03515625 +/- 9.331709130062185 Which puts Chrome at about 11x these native compilers, consistent with the blog post.
gcc 4.8.0: 1.640625 +/- 3.703323
clang 3.2: 1.718750 +/- 3.772718
chrome : 23.28515625 +/- 3.636932727324763
So chrome is about ~14x the native compilers.Changing gcc to use -O2 instead of -O3 gets: 1.562500 +/- 3.630922.