[QUOTE=atomsymbol;n889515]
Best of 3 runs of each: The gap is wider with plain -O2.
time g++ -O3 -march=haswell -mtune=haswell -std=c++11 -o fib-gcc fib.cpp
real 0m0.235s
user 0m0.203s
sys 0m0.020s
time clang++ -O3 -march=haswell -mtune=haswell -std=c++11 -o fib-clang fib.cpp
real 0m0.429s
user 0m0.407s
sys 0m0.020s
How do you know? Did you audit a very large amount of codebases? It clang optimized it and gcc didn't, you'd probably be
ridiculing the gcc developers for missing such an obvious and easy optimization, yes?
I Just don't get the hate for gcc. It's a great all-purpose compiler, that isn't he "hot new thing" like clang and therefore
doesn't have the attention of "rockstar" developers. Given that, the core develepors, few they are, are doing a tremendous
job keeping up with and surpassing llvm/clang.
Originally posted by mlau
View Post
Best of 3 runs of each: The gap is wider with plain -O2.
time g++ -O3 -march=haswell -mtune=haswell -std=c++11 -o fib-gcc fib.cpp
real 0m0.235s
user 0m0.203s
sys 0m0.020s
time clang++ -O3 -march=haswell -mtune=haswell -std=c++11 -o fib-clang fib.cpp
real 0m0.429s
user 0m0.407s
sys 0m0.020s
gcc is able to figure out the tail call. Tail calls such as this one are very uncommon in real-world source code.
ridiculing the gcc developers for missing such an obvious and easy optimization, yes?
I Just don't get the hate for gcc. It's a great all-purpose compiler, that isn't he "hot new thing" like clang and therefore
doesn't have the attention of "rockstar" developers. Given that, the core develepors, few they are, are doing a tremendous
job keeping up with and surpassing llvm/clang.
Comment