https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71741

            Bug ID: 71741
           Summary: The program works 3 times slower compiled with g++
                    5.3.1 than the same program compiled with g++ 4.8.4
                    with the same command (i7-5820 Haswell)
           Product: gcc
           Version: 5.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cranon at yandex dot ru
  Target Milestone: ---

Created attachment 38821
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38821&action=edit
All data (Makefile, compile_log, *.ii, *.s files) are in attach.7z

I have a some code that contains many cycles (for) where it calls some maths
(sin, cos, exp). 
Previously, I built it with g++ 4.8.4 (Ubuntu 14.04.3, libm-2.19)with flags:
-std=c++11 -Wall -O3

Now, I have g++ 5.3.1 (Ubuntu 16.04, libm-2.23), and I compile it with the same
command.
It become 3 times slower (program time).

I've tried to compile with different optimization flags (O0, O1, O2, O3,
Ofast), but in all cases the problem is reproduced (with Ofast both variants
works faster, but the second works 3 times slower than the first)

I use in my program libtinyxml-dev, libgslcblas. But they have the same
versions in both cases and don't take any significant part in the program
(according to code and callgrind profiling) in terms of performance.

My proc is i7-5820 Haswell.
All data (Makefile, compile_log, *.ii, *.s files) are in attach.7z

Reply via email to