Linked by ebasconp on Fri 10th Jun 2011 22:22 UTC
Benchmarks "Google has released a research paper that suggests C++ is the best-performing programming language in the market. The internet giant implemented a compact algorithm in four languages - C++, Java, Scala and its own programming language Go - and then benchmarked results to find 'factors of difference'."
Permalink for comment 477093
To read all comments associated with this story, please click here.
RE[6]: GCC isn't all that great
by Alfman on Mon 13th Jun 2011 19:01 UTC in reply to "RE[5]: GCC isn't all that great"
Alfman
Member since:
2011-01-28

"Having two comparisons within the loop was obviously poor coding in this example, which you expected the compiler to fix for you."

I think it surprised you that I was able to come up with an example, and now your grasping at straws... I won't hold you to your original statements, don't feel the need to defend them.


"If you find that the performance is not what you'd expect out of the given code, you will profile and look at assembly output of the performance hotspots, doesn't matter if it's GCC, VC, ICC, Clang/LLVM."

The difference is, there is no need to audit the compiler if it can be trusted to do a great job in the first place. The fact that we can reveal shortcomings by looking at GCC's asm dump implies that we are able to do better.

"Legal constructs does not equal efficient code. Compilers have never been able to turn shitty code into good code. If you know of one, please inform me, I'd buy it in a second."

Still more excuses. Why does GCC reorder and optimize some code paths but not others? The developer shouldn't have to mess with clean code just to make it perform better under GCC.


"I compiled your snippet with Clang 2.9, it didn't vectorize it either until I exchanged the len vars with constants just like in the case with GCC. Again I doubt ICC would do it either."

That's not really a sufficient answer.

Reply Parent Score: 2