Performance improvements moving from g ++ / gcc 3.2.3 to 4.2.4

We watched g.3 versions 3.2.3 and 4.2.4. In 4.2.4, the performance improvements of some of our codebases are significant.

I tried to find the gcc buzilla database to find hints as to which errors might have had such a significant improvement, but I didn’t do that, t find any individual error that stood out as a candidate.

Are the improvements the result of many small changes that have slowly affected? Or was it said that the 5 best improvements that can make a difference?

Against some background, our code base makes good use of containers and STL algorithms, as well as C ++ functions, such as the "inline" keyword.

+3
source share
3 answers

In my experience, 3.4, where performance basically peaked; 4.2 is actually slower than 3.4 in my project, and 4.3 is the first, roughly equal to 3.4 performance. 4.4 is slightly faster than 3.4.

There are several cases where I found that older versions of gcc did some incredibly backward things in the code - there was a certain function that went from 128 to 21 measures from 3.4 to 4.3, but that was obviously special (it was a short loop, in which adding a few extra instructions greatly degraded performance).

3.4 , , . , , , ; --march core2 gcc segfaults , , autovectorized , .

, ; 3-5% - , .

, C; ++ .

+3

, gcc4. . , , :

http://gcc.gnu.org/projects/tree-ssa/vectorization.html

, - c [i] = a [i] + b [i] , std::vector, std::vector (w/gcc 4.1). 30% .

+2

Threads were very slow at 3.3 and significantly accelerated at 3.4. ( message on the gcc mailing list ) I bet other things have also improved.

+1
source

Source: https://habr.com/ru/post/1697371/


All Articles