[Bug target/33604] [4.3/4.4 Regression] Revision 119502 causes significantly slower results with 4.3/4.4 compared to 4.2

2008-02-27 Thread jacob at math dot jussieu dot fr
--- Comment #36 from jacob at math dot jussieu dot fr 2008-02-27 16:58 --- That's great; from the assembly code I take it that you are referring tothe last benchmark.cpp; I was referring to the first one. Again, my 4.3 is one month old so maybe things have further improved

[Bug tree-optimization/33604] [4.3/4.4 Regression] Revision 119502 causes significantly slower results with 4.3/4.4 compared to 4.2

2008-02-27 Thread jacob at math dot jussieu dot fr
--- Comment #34 from jacob at math dot jussieu dot fr 2008-02-27 16:36 --- I retried today with g++-4.3 (Ubuntu 4.3-20080126-1ubuntu1) 4.3.0 20080126 (experimental) [trunk revision 131874] and my benchmark ran in 25s compared to 20s with g++-4.2.3. So there is certainly a lot of

[Bug c++/35393] Deep templates get 40x slower when depth goes from 17 to 18.

2008-02-27 Thread jacob at math dot jussieu dot fr
--- Comment #5 from jacob at math dot jussieu dot fr 2008-02-27 16:22 --- Oh sure, I hadn't thought about that, but it makes perfect sense to not "flatten" callees whose body source code is not available. I tried g++-4.3 and confirm that it is much faster and doesn

[Bug c++/35393] Deep templates get 40x slower when depth goes from 17 to 18.

2008-02-27 Thread jacob at math dot jussieu dot fr
--- Comment #3 from jacob at math dot jussieu dot fr 2008-02-27 15:49 --- Thank you for the quick reply. I'm glad to hear that it's fixed and much improved in 4.3. I tried what you said about __attribute__((flatten)) (I copied and pasted your code) and that didn&#x

[Bug c++/35393] Deep templates get 40x slower when depth goes from 17 to 18.

2008-02-27 Thread jacob at math dot jussieu dot fr
--- Comment #1 from jacob at math dot jussieu dot fr 2008-02-27 14:48 --- Created an attachment (id=15238) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15238&action=view) test case referred to in first post -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35393

[Bug c++/35393] New: Deep templates get 40x slower when depth goes from 17 to 18.

2008-02-27 Thread jacob at math dot jussieu dot fr
normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jacob at math dot jussieu dot fr http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35393

[Bug tree-optimization/33604] [4.3 Regression] Revision 119502 causes significantly slower results with 4.3 compared to 4.2

2007-11-09 Thread jacob at math dot jussieu dot fr
--- Comment #27 from jacob at math dot jussieu dot fr 2007-11-09 12:55 --- OK, I'm using ubuntu and there's no 4.3 package, and last time I tried compiling a snapshot it failed. I hope someone else will be able to run the benchmark and post the result. -- http://g

[Bug tree-optimization/33604] [4.3 Regression] Revision 119502 causes significantly slower results with 4.3 compared to 4.2

2007-11-09 Thread jacob at math dot jussieu dot fr
--- Comment #25 from jacob at math dot jussieu dot fr 2007-11-09 12:49 --- Huge thanks to Richard Guenther for the fix! I don't have a 4.3 installed here but I trust you if you say it's fixed :) Also thanks to everybody who helped, especially to Paolo Bonzini for the minima

[Bug tree-optimization/33604] [4.3 Regression] Revision 119502 causes significantly slower results with 4.3 compared to 4.2

2007-11-07 Thread jacob at math dot jussieu dot fr
--- Comment #21 from jacob at math dot jussieu dot fr 2007-11-07 20:58 --- Hi, I'm the guy behind Eigen, from which the initial testcase is taken. Would it help the compiler if I removed most of the "const" keywords in my code? I am asking because of the followin

[Bug c++/33599] segfault in program compiled by g++ 4.2, corrupted reference

2007-09-30 Thread jacob at math dot jussieu dot fr
--- Comment #7 from jacob at math dot jussieu dot fr 2007-09-30 16:41 --- OK, the person who reported the speed regression with g++-4.3 (Michael Olbrich) will open a bug report. I don't actually have g++-4.3 compiled so I'm not the right person to do so. Thanks, Benoit

[Bug c++/33599] segfault in program compiled by g++ 4.2, corrupted reference

2007-09-30 Thread jacob at math dot jussieu dot fr
--- Comment #5 from jacob at math dot jussieu dot fr 2007-09-30 14:58 --- OK, found it, it was a very stupid error by me. Declared the matrix's array with the wrong size, so some write eventually wrote outside of the matrix's array, thus overwriting a reference. Closing the

[Bug c++/33599] segfault in program compiled by g++ 4.2, corrupted reference

2007-09-30 Thread jacob at math dot jussieu dot fr
--- Comment #4 from jacob at math dot jussieu dot fr 2007-09-30 13:47 --- I had tried to make a shorter testcase but didn't find any that caused a crash. But yes, the shorter testcase that you found indeed causes a crash here. With both 4.1 and 4.2. So indeed, that's prob

[Bug c++/33599] segfault in program compiled by g++ 4.2, corrupted reference

2007-09-30 Thread jacob at math dot jussieu dot fr
--- Comment #2 from jacob at math dot jussieu dot fr 2007-09-30 09:16 --- Here are some thoughts about why it is so fast with g++-4.2, perhaps related to why it segfaults. My library is an Expression Templates library. So when you do m1+m2 with matrices m1 and m2, instead of computing

[Bug c++/33599] segfault in program compiled by g++ 4.2, corrupted reference

2007-09-30 Thread jacob at math dot jussieu dot fr
--- Comment #1 from jacob at math dot jussieu dot fr 2007-09-30 08:57 --- Created an attachment (id=14271) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14271&action=view) The archive allowing to reproduce the bug. Of course, I forgot the attachment :) -- http://gcc.

[Bug c++/33599] New: segfault in program compiled by g++ 4.2, corrupted reference

2007-09-30 Thread jacob at math dot jussieu dot fr
t this didn't happen with g++-4.1 suggests to me that this might be a bug in g++-4.2. Of course I might be wrong, I'm not an expert. Cheers, Benoit -- Summary: segfault in program compiled by g++ 4.2, corrupted reference Product: gcc Vers

[Bug middle-end/30201] gcc doesn't unroll nested loops

2006-12-14 Thread jacob at math dot jussieu dot fr
--- Comment #18 from jacob at math dot jussieu dot fr 2006-12-14 16:47 --- (In reply to comment #15) > If the loop bounds are compile-time constants you can use template > metaprogramming to unroll them. > I shouldn't elaborate on this as this is not the subject of t

[Bug middle-end/30201] gcc doesn't unroll nested loops

2006-12-14 Thread jacob at math dot jussieu dot fr
--- Comment #17 from jacob at math dot jussieu dot fr 2006-12-14 16:34 --- (In reply to comment #15) > If the loop bounds are compile-time constants you can use template > metaprogramming to unroll them. > ah right, I initially misread "unroll" as "unnest&quo

[Bug middle-end/30201] gcc doesn't unroll nested loops

2006-12-14 Thread jacob at math dot jussieu dot fr
--- Comment #16 from jacob at math dot jussieu dot fr 2006-12-14 16:28 --- (In reply to comment #15) > If the loop bounds are compile-time constants you can use template > metaprogramming to unroll them. > That is true, I will think about that. I was also mentionnin

[Bug middle-end/30201] gcc doesn't unroll nested loops

2006-12-14 Thread jacob at math dot jussieu dot fr
--- Comment #14 from jacob at math dot jussieu dot fr 2006-12-14 16:24 --- I forgot to say that size() is an inline function returning a constant that is known at compile-time (a template parameter). Otherwise, of course, I wouldn't expect these loops to get unrolled... --

[Bug middle-end/30201] gcc doesn't unroll nested loops

2006-12-14 Thread jacob at math dot jussieu dot fr
--- Comment #13 from jacob at math dot jussieu dot fr 2006-12-14 16:22 --- (In reply to comment #12) > Yes. However, all this is only for my reduced testcase without the use of > the C++ class. For the original testcase, the issues Andrew P. identified > are still true. OK

[Bug middle-end/30201] gcc doesn't unroll nested loops

2006-12-14 Thread jacob at math dot jussieu dot fr
--- Comment #11 from jacob at math dot jussieu dot fr 2006-12-14 15:56 --- Very interesting, thanks... so does it mean that gcc did loop unrolling after all? (sorry, I'm a newbie when it comes to compiler/assembler stuff). And the speed difference was only caused by the com

[Bug middle-end/30201] gcc doesn't unroll nested loops

2006-12-13 Thread jacob at math dot jussieu dot fr
--- Comment #6 from jacob at math dot jussieu dot fr 2006-12-13 20:24 --- (In reply to comment #4) > most likely not in 4.2. I think something could be done in 4.3 timeframe. ah, ok. Thanks for the information. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30201

[Bug middle-end/30201] gcc doesn't unroll nested loops

2006-12-13 Thread jacob at math dot jussieu dot fr
--- Comment #5 from jacob at math dot jussieu dot fr 2006-12-13 20:22 --- Nope... with -O3 -ffast-math I get 1.9 seconds in average (this is a laptop with CPU frequency scaling, so it's difficult to get precise numbers). Adding -funroll-loops in addition to -ffast-math doesn'

[Bug middle-end/30201] gcc doesn't unroll nested loops

2006-12-13 Thread jacob at math dot jussieu dot fr
--- 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 = (

[Bug c++/30201] New: gcc doesn't unroll nested loops

2006-12-13 Thread jacob at math dot jussieu dot fr
esn't unroll nested loops Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jacob at math dot jussieu dot fr http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30201