This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35393] Deep templates get 40x slower when depth goes from 17 to 18.
- From: "jacob at math dot jussieu dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Feb 2008 16:22:03 -0000
- Subject: [Bug c++/35393] Deep templates get 40x slower when depth goes from 17 to 18.
- References: <bug-35393-13749@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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't suffer from that
bug.
I tried what you last suggested regarding 4.2:
$ g++ -O3 -DDEPTH18 --param sra-field-structure-ratio=0 test.cpp -o test
$ time ./test
real 0m2.634s
This is much better, but still 50% slower than -DDEPTH17.
Anyway, since it is more than resolved in 4.3.0 I won't waste more of your time
with that :)
Thanks
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35393