[Bug c++/80952] New: gcc 7.1.1 has a drastic performance downgrade using "-fprofile-arcs" compared to 6.3.1 version
xiaonan830818 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 2 08:43:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80952
Bug ID: 80952
Summary: gcc 7.1.1 has a drastic performance downgrade using
"-fprofile-arcs" compared to 6.3.1 version
Product: gcc
Version: 7.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: xiaonan830818 at gmail dot com
Target Milestone: ---
Created attachment 41448
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41448&action=edit
Test program
Hi all,
My testbed is ArchLinux, X86_64, 32 cores, and I use the attached file to test
performance.
(1) Use the newest gcc 7.1.1, and build without "-fprofile-arcs" compile option
and run program:
$ g++ -fopenmp -g -O2 parallel.cpp
$ ./a.out
Function consume: 0.743077 s.
Then build with "-fprofile-arcs" compile option:
$ g++ -fopenmp -fprofile-arcs -g -O2 parallel.cpp
$ ./a.out
Function consume: 208 s.
We can see the performance gap is too large.
(2) While use gcc 6.3.1, without "-fprofile-arcs":
$ g++ -fopenmp -g -O2 parallel.cpp
$ ./a.out
Function consume: 0.77169 s.
use it:
$ g++ -fopenmp -fprofile-arcs -g -O2 parallel.cpp
$ ./a.out
Function consume: 0.746134 s.
We can see the performance is very near.
More information about the Gcc-bugs
mailing list