[Bug tree-optimization/19445] 50 fold compile time increase between gcc-3,4 and gcc-4,0 on included code
--- Additional Comments From phil at fsel dot com 2005-01-17 11:06 --- Subject: Re: 50 fold compile time increase between gcc-3,4 and gcc-4,0 on included code On Fri, Jan 14, 2005 at 09:20:43PM -, pinskia at gcc dot gnu dot org wrote: > If in the source I mark unhook as it does not throw anything, the compile > time goes back down to what > should be. Indeed. And I can confirm that the tree-profiling branch doesn't show the problem on the original source code either. cheers, Phil -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19445
[Bug c++/19445] 50 fold compile time increase between gcc-3,4 and gcc-4,0 on included code
--- Additional Comments From phil at fsel dot com 2005-01-14 20:29 --- Subject: Re: 50 fold compile time increase between gcc-3,4 and gcc-4,0 on included code On Fri, Jan 14, 2005 at 05:02:48PM -, pinskia at gcc dot gnu dot org wrote: > Can you check with --disable-checking as checking is turned on by > default on the mainline of 4.0.0. Not as bad, but still pretty awful: $ /scribble/phil/gcc/install/bin/g++ -v Using built-in specs. Configured with: ../gcc/configure --prefix=/scribble/phil/gcc/install --disable-checking --enable-languages=c++ Thread model: posix gcc version 4.0.0 20050114 (experimental) $ time /scribble/phil/gcc/install/bin/g++ -O -c list1.cpp real0m1.758s user0m1.677s sys 0m0.035s $ time gcc-3.4 -O -c list1.cpp real0m0.101s user0m0.069s sys 0m0.009s cheers, Phil -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19445
[Bug c++/19445] 50 fold compile time increase between gcc-3,4 and gcc-4,0 on included code
--- Additional Comments From phil at fsel dot com 2005-01-14 16:53 --- Created an attachment (id=7959) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7959&action=view) .ii file -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19445
[Bug c++/19445] New: 50 fold compile time increase between gcc-3,4 and gcc-4,0 on included code
$ time g++-snapshot -O -c list1.ii real0m3.617s user0m3.515s sys 0m0.043s $ time g++-3.4 -O -c list1.ii real0m0.068s user0m0.028s sys 0m0.007s $ g++-snapshot -v Using built-in specs. Configured with: ../src/configure -v --enable-languages=c,c++,java,objc,ada --prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --enable-nls --enable-threads=posix --without-included-gettext --disable-werror --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk i486-linux-gnu Thread model: posix gcc version 4.0.0 20050110 (experimental) $ cat list1.ii # 1 "list1.cpp" # 1 "" # 1 "" # 1 "list1.cpp" template class Pointer { typedef Pointer point; T *ptr; public: Pointer() : ptr(0) { } Pointer(T *x) : ptr(x) { if(ptr) ptr->inc(); } ~Pointer() { if(ptr) ptr->dec(); ptr=0; } T *operator->() const { return ptr; } T &operator*() const { return *ptr; } bool null() const { return ptr == 0; } void exchange(Pointer &x) { T *t = x.ptr; x.ptr = ptr; ptr = t; } }; class ListNode { public: mutable int count; Pointer next; void unhook(Pointer *p) { while(!(*p).null() && (*p)->count == 1) { Pointer t; t.exchange((*p)->next); t.exchange(*p); } } public: ~ListNode() { unhook(&next); } void inc() const { ++count; } void dec() const { if(--count <= 0) delete this; } public: ListNode(const int &d) : count(0), next() { } }; void test(ListNode p) { p.unhook(&p.next); } -- Summary: 50 fold compile time increase between gcc-3,4 and gcc- 4,0 on included code Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: phil at fsel dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19445