3 ms·
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
by evmar 14y ago
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.
- joelgwebber 14y agoFWIW, 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.
- eliben 14y agoThere'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.
- joelgwebber 14y agoGood 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
- joelgwebber 14y agoDitto for gcc-4.8. Roughly the same (ever so slightly worse) performance.
- dmm 14y agogcc 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.
- gillianseed 14y agoWhat about -Ofast which enables -ffast-math?
- dmm 14y agoThe makefile supplied with the repo specifies -ffast-math. It uses these CFLAGS: CFLAGS=-s -O3 -msse -mfpmath=sse -ffast-math -fomit-frame-pointer -IBox2D_v2.2.1 -DNDEBUG=1 Using -Ofast gets the same results as -O2.
- gillianseed 14y agoThanks for the info, I should have guessed that he enabled -ffast-math manually.