This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/10760] Compile time increases quadratically with struct size
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jul 2003 13:29:04 -0000
- Subject: [Bug c++/10760] Compile time increases quadratically with struct size
- References: <20030512224601.10760.hzoli@hzoli.2y.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10760
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c++ |c
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-05-24 01:27:24
date| |
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c |c++
Keywords| |compile-time-hog
Target Milestone|--- |3.4
------- Additional Comments From bangerth at dealii dot org 2003-05-24 01:27 -------
I can confirm this with the C compiler:
g/x> bash big.sh 5000 > x.c
g/x> time /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.c
real 0m5.777s
user 0m5.470s
sys 0m0.070s
g/x> bash big.sh 10000 > x.c
g/x> time /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.c
real 0m22.423s
user 0m21.170s
sys 0m0.130s
g/x> bash big.sh 20000 > x.c
g/x> time /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.c
real 1m32.867s
user 1m22.020s
sys 0m0.210s
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -v
Reading specs from
/home/bangerth/bin/gcc-3.4-pre/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc-3.4-CVS/configure --enable-languages=c,c++,f77
--enable-checking --prefix=/home/bangerth/bin/gcc-3.4-pre
Thread model: posix
gcc version 3.4 20030520 (experimental)
W.
------- Additional Comments From pinskia at physics dot uc dot edu 2003-05-24 02:08 -------
Ok I can confirm this on both C and C++ still:
[zhivago2:~/src/gccPRs/10760] pinskia% sh biggen.sh 10000 > big.c
[zhivago2:~/src/gccPRs/10760] pinskia% time g++ -S big.c
6.980u 0.270s 0:07.46 97.1% 0+0k 0+0io 0pf+0w
[zhivago2:~/src/gccPRs/10760] pinskia% sh biggen.sh 20000 > big.c
[zhivago2:~/src/gccPRs/10760] pinskia% time g++ -S big.c
29.950u 0.620s 0:32.47 94.1% 0+0k 0+2io 0pf+0w
[zhivago2:~/src/gccPRs/10760] pinskia% time gcc -S big.c
29.270u 0.550s 0:31.55 94.5% 0+0k 0+4io 0pf+0w
[zhivago2:~/src/gccPRs/10760] pinskia% sh biggen.sh 10000 > big.c
[zhivago2:~/src/gccPRs/10760] pinskia% time gcc -S big.c
6.530u 0.220s 0:06.95 97.1% 0+0k 0+0io 0pf+0w
[zhivago2:~/src/gccPRs/10760] pinskia% gcc -v
Reading specs from /Users/pinskia/fsf-nocheck/lib/gcc-lib/powerpc-apple-darwin6.6/3.4/
specs
Configured with: /Volumes/UFS_Partition/pinskia/src/fsf/gcc/src/configure --enable-
threads=posix --disable-nls --disable-multilib --disable-checking --enable-libjaava --
prefix=/Users/pinskia/fsf-nocheck
Thread model: posix
gcc version 3.4 20030523 (experimental)
[zhivago2:~/src/gccPRs/10760] pinskia% g++ -v
Reading specs from /Users/pinskia/fsf-nocheck/lib/gcc-lib/powerpc-apple-darwin6.6/3.4/
specs
Configured with: /Volumes/UFS_Partition/pinskia/src/fsf/gcc/src/configure --enable-
threads=posix --disable-nls --disable-multilib --disable-checking --enable-libjaava --
prefix=/Users/pinskia/fsf-nocheck
Thread model: posix
gcc version 3.4 20030523 (experimental)
[zhivago2:~/src/gccPRs/10760] pinskia%
------- Additional Comments From pinskia at physics dot uc dot edu 2003-05-24 02:17 -------
C++ is quadratically in delete_duplicate_fields/delete_duplicate_fields_1 in cp/class.c,
this could be fixed by using a hashtable like C does in detect_field_duplicates in c-decl.c
.