public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60291] New: slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs)
@ 2014-02-20 14:02 slyfox at inbox dot ru
  2014-02-20 14:14 ` [Bug c/60291] " slyfox at inbox dot ru
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: slyfox at inbox dot ru @ 2014-02-20 14:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60291

            Bug ID: 60291
           Summary: slow compile times for any mode (-O0/-O1/-O2) on large
                    .c source file (30MBs)
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at inbox dot ru

Created attachment 32182
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32182&action=edit
ghc14232_3.hc.i.bz2 - compressed source file (30MBs uncompressed)

GHC (glasgow haskell compiler) in it's portable mode generates
intermediate .C source files. Sometimes they are really large: 20-100 MB.

Even on core-i7 building such files takes: 3-5 minutes.
On slower boxes/arches things are worse and go up to 20-60 minutes.

clang does not seem to have such problems [1].
gcc version should not be very relevant. Time test are for [2].

If the problem is hard to fix in gcc what options would you
suggest to enable to get sane build times? -fno-unit-at-a-time
does not seem to help.

Thanks!

[1]:

[sf] /tmp/__z:time gcc -O0 -Wno-ignored-attributes -c ghc14232_3.hc.i -o gcc.o

real    5m19.975s
user    5m18.403s
sys     0m0.629s
[sf] /tmp/__z:time gcc -O1 -Wno-ignored-attributes -c ghc14232_3.hc.i -o gcc.o

real    3m0.557s
user    2m58.496s
sys     0m0.623s
[sf] /tmp/__z:time gcc -O2 -Wno-ignored-attributes -c ghc14232_3.hc.i -o gcc.o

real    3m21.315s
user    3m19.691s
sys     0m0.550s

[sf] /tmp/__z:time clang -O0 -Wno-ignored-attributes -c ghc14232_3.hc.i -o
clang.o

real    0m19.661s
user    0m19.356s
sys     0m0.234s
[sf] /tmp/__z:time clang -O1 -Wno-ignored-attributes -c ghc14232_3.hc.i -o
clang.o

real    0m49.612s
user    0m49.145s
sys     0m0.295s
[sf] /tmp/__z:time clang -O2 -Wno-ignored-attributes -c ghc14232_3.hc.i -o
clang.o

real    0m48.991s
user    0m48.539s
sys     0m0.278s

[2]:
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/subvolumes/var_tmp/portage/sys-devel/gcc-4.8.2-r1/work/gcc-4.8.2/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/include/g++-v4
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.8.2/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.8.2-r1 p1.4-ssptest, pie-0.5.9-ssptest'
--enable-libstdcxx-time --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point
--enable-targets=all --disable-libgcj --enable-libgomp --disable-libmudflap
--disable-libssp --enable-lto --without-cloog
Thread model: posix
gcc version 4.8.2 (Gentoo 4.8.2-r1 p1.4-ssptest, pie-0.5.9-ssptest)


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2015-06-29  8:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-20 14:02 [Bug c/60291] New: slow compile times for any mode (-O0/-O1/-O2) on large .c source file (30MBs) slyfox at inbox dot ru
2014-02-20 14:14 ` [Bug c/60291] " slyfox at inbox dot ru
2014-02-20 14:31 ` trippels at gcc dot gnu.org
2014-02-20 14:49 ` trippels at gcc dot gnu.org
2014-02-20 15:27 ` rguenth at gcc dot gnu.org
2014-02-20 15:40 ` rguenth at gcc dot gnu.org
2014-02-20 16:01 ` rguenth at gcc dot gnu.org
2014-02-20 16:48 ` trippels at gcc dot gnu.org
2014-02-20 20:13 ` jakub at gcc dot gnu.org
2014-02-21  9:14 ` rguenth at gcc dot gnu.org
2014-02-21  9:25 ` rguenth at gcc dot gnu.org
2014-02-21  9:55 ` [Bug middle-end/60291] " rguenth at gcc dot gnu.org
2014-02-21 10:02 ` rguenth at gcc dot gnu.org
2014-02-21 11:09 ` [Bug middle-end/60291] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-02-21 13:15 ` rguenth at gcc dot gnu.org
2014-02-21 13:31 ` rguenth at gcc dot gnu.org
2014-02-25  8:59 ` [Bug middle-end/60291] [4.7/4.8 " rguenth at gcc dot gnu.org
2014-02-25  8:59 ` rguenth at gcc dot gnu.org
2014-02-25 10:44 ` rguenth at gcc dot gnu.org
2014-02-25 10:48 ` rguenth at gcc dot gnu.org
2014-06-12 13:42 ` rguenth at gcc dot gnu.org
2014-12-10 12:53 ` [Bug middle-end/60291] [4.8 " rguenth at gcc dot gnu.org
2015-06-29  8:51 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).