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'."
Thread beginning with comment 477064
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[4]: GCC isn't all that great
by Neolander on Mon 13th Jun 2011 09:56 UTC in reply to "RE[3]: GCC isn't all that great"
Neolander
Member since:
2010-03-08

Aren't those supposed to be automatically enabled by O2 or O3 ?

Reply Parent Score: 1

Carewolf Member since:
2005-09-08

Depends on the gcc-version.

I just double-checked: According to info:gcc the most recent version (4.6) has enabled -ftree-vectorize on -O3, but still not -funroll-loops.

Unrolling is only default enabled if you compile with profiling-data that helps the compiler to unroll the correct loops.

Reply Parent Score: 2

Neolander Member since:
2010-03-08

Thanks for the clarification.

I think I can understand the rationale behind that decision : loop unrolling sounds like a rather costly optimization if mindlessly applied to all loops without PGO coming into play. But in this case, where PGO is not used, it indeed reduces the performance of the GCC binary.

Reply Parent Score: 1