http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50182
Bug #: 50182
Summary: Performance degradation from gcc 4.1 (x86_64)
Classification: Unclassified
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: oleg.smol...@gmail.com
G++ 4.6 emits slower code based on the following set of benchmarks:
http://stlab.adobe.com/performance/
The discussion thread is here:
http://gcc.gnu.org/ml/gcc/2011-07/threads.html#00506
http://gcc.gnu.org/ml/gcc/2011-08/threads.html#00411
I digested one of the tests down to a single short case (see attachments):
http://gcc.gnu.org/ml/gcc/2011-08/msg00391.html
g++ 4.1 (1.35 sec, 1185M ops/s):
.text:0000000000400FE0 loc_400FE0:
.text:0000000000400FE0 movzx eax, ds:data8[rdx]
.text:0000000000400FE7 add rdx, 1
.text:0000000000400FEB add eax, 0Ah
.text:0000000000400FEE cmp rdx, 1F40h
.text:0000000000400FF5 lea ecx, [rax+rcx]
.text:0000000000400FF8 jnz short loc_400FE0
g++ 4.6 (2.86s, 563M ops/s) :
.text:0000000000400D90 loc_400D90:
.text:0000000000400D90 add eax, 0Ah
.text:0000000000400D93 add al, [rdx]
.text:0000000000400D95 add rdx, 1
.text:0000000000400D99 cmp rdx, 503480h
.text:0000000000400DA0 jnz short loc_400D90
P.S. setting the component to C++. Optimizer?