[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: poor gcc-4.0 performance

>bruteforcing, or I am missing something out? Is there a reason for such
>performance differences?

Yes, You have used '-O3' flag which triggers -finline-functions

Default inline heuristics just cannot fit well for all, and thus are subject to
change from time to time. See [1] and [2] for more information on this topic.

To fix that, You have few choices:
o use -O2
o tweak inlining heuristics yourself (see [3])
o use -fprofile-generate/-fprofile-use, like this:

$ cd john-1.6.38/src
$ make CFLAGS='-c -O3 -fprofile-generate' LDFLAGS=-fprofile-generate linux-x86-64
$ ../run/john --test
$ make clean
$ make CFLAGS='-c -O3 -fprofile-use' LDFLAGS=-fprofile-use linux-x86-64

[1] http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00333.html
[2] http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01936.html
[3] http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-param-571

Reply to: