Thanks for a fast answer, I use -O3 -march=native -fomit-frame-pointer -DDEBUG -ffast-math -frename-registers -ggdb3 -Wall -Wextra -Wswitch-enum but I have the same effect with only -O3 Versions: g++-4.2 (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu1) g++-4.3 (Ubuntu 4.3.2-1ubuntu7) 4.3.2 The original library is here: http://www.mimuw.edu.pl/~lew/hg/libego/?shortlog I extracted only the benchmark part: http://www.mimuw.edu.pl/~lew/libego_benchmark.tgz I also found strange one-line difference that degrades performance of g++-4.2 compiled binary to the level of g++-4.3. I don't get it at all .. If you have any insights please let me know, it is very important to me. Lukasz On Sun, Sep 21, 2008 at 23:24, Brian D. McGrew <brian@xxxxxxxxxxxxx> wrote: > Source code would be a good start??? Optimization flags??? Architecture flags??? How was gcc-4.3 vs. gcc-4.2 built??? (g++ --version will show this). > > -brian > > -----Original Message----- > From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On Behalf Of Lukasz Lew > Sent: Sunday, September 21, 2008 2:20 PM > To: gcc-help@xxxxxxxxxxx > Subject: Performance problem > > Hi > > I have a program that when compiled with g++-4.3 is 10% slower than with g++-4.2 > I tried to look at the asm output, but its way too different. > How should I proceed to get my 10% back? > > Thanks > Lukasz >