Bug 39860 - extremely long compile time
Summary: extremely long compile time
Status: RESOLVED DUPLICATE of bug 33237
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-23 04:23 UTC by Alexander Pletzer
Modified: 2009-04-23 09:34 UTC (History)
8 users (show)

See Also:
Host: Linux quartic.txcorp.com 2.6.25.14-108.fc9.x86_64 #1 SMP Mon Aug
Target: x86_64-redhat-linux
Build: Configured with: ../configure --prefix=/usr --mandir=/usr/share/
Known to work:
Known to fail:
Last reconfirmed:


Attachments
source code reproducing problem (40.39 KB, application/octet-stream)
2009-04-23 04:38 UTC, Alexander Pletzer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pletzer 2009-04-23 04:23:28 UTC
The attached code takes 20 mins to compile on a Linux/Fedora 9 box when using -O optimization, but only 21 seconds when using -O0

[pletzer@quartic cxxps]$ time g++ -O -ftime-report -fmem-report -c cxxps.cpp >& stat.txt

real	21m41.494s
user	16m24.774s
sys	0m19.713s

[pletzer@quartic cxxps]$ time g++ -O0 -ftime-report -fmem-report -c cxxps.cpp >& stat.txt

real	0m21.391s
user	0m17.666s
sys	0m2.453s
Comment 1 Alexander Pletzer 2009-04-23 04:38:37 UTC
Created attachment 17681 [details]
source code reproducing problem

I apologize but I cannot produce *.i files with -save-temps:

[pletzer@localhost test]$ g++ -c -save-temps cxxps.cpp
[pletzer@localhost test]$ ls
ccps_base.h  cxxps.cpp  cxxps.o                                  f77name.h
ccps.h       cxxps.h    cxxps.tmp.localhost.localdomain.10206.s  multiarray.h


 so I'm sending the source and headers as a bz2 compressed file. To reproduce the problem of very long compile time, type

tar xvfj cxxps.bz2
g++ -c -O cxxps.cpp
Comment 2 Richard Biener 2009-04-23 09:34:47 UTC
 tree memory partitioning:  51.43 (20%) usr   0.26 ( 9%) sys  51.80 (20%) wall      19 kB ( 0%) ggc
 tree operand scan     : 149.30 (58%) usr   1.20 (43%) sys 151.17 (57%) wall   18536 kB ( 4%) ggc

4.4 uses

 tree memory partitioning:  42.43 (26%) usr   0.33 (14%) sys  42.84 (26%) wall      13 kB ( 0%) ggc
 tree operand scan     :  71.91 (45%) usr   0.59 (25%) sys  72.88 (44%) wall   14670 kB ( 3%) ggc

trunk does not have the above on the radar at all.

thus ...

*** This bug has been marked as a duplicate of 33237 ***