------- Comment #2 from jacob at math dot jussieu dot fr 2006-12-13 18:54 ------- 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 ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30201