------- Comment #4 from rakdver at atrey dot karlin dot mff dot cuni dot cz 2006-12-13 20:22 ------- Subject: Re: gcc doesn't unroll nested loops
> Not understanding much in compiler stuff, I tried what you said, namely > replace > the loop with > > for( int i = 0; i < 3; i++ ) > for( int j = 0; j < 3; j++ ) > { > bool a = (i == j); > (*this)(i, j) = a * factor; > } > > and compile with -O3 -funroll-loops, and toto ran in 1.1 seconds. That's > better > than the original 1.9 seconds, but still far from the 0.3 seconds I get > manually unrolling the loop. > > Do you think there is a chance to have this bug fixed in 4.2.x or 4.3.x ? most likely not in 4.2. I think something could be done in 4.3 timeframe. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30201