public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jvoss at altsci dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/44563]  New: GCC uses a lot of RAM when compiling a large numbers of functions
Date: Thu, 17 Jun 2010 04:10:00 -0000	[thread overview]
Message-ID: <bug-44563-19336@http.gcc.gnu.org/bugzilla/> (raw)

When compiling a 5 MB C file with 65337 functions, gcc takes over 700 MB of ram
compiling the file to assembly. Files with fewer functions (32769 and 16385)
take exponentially less time. A workaround is to split the file into multiple c
files and compile into intermediate files seperately.

tinycc aka tcc takes 0.5 seconds to compile the same file.

I'd be happy to provide more information and justifications for such a large
number of functions, but I assume that the bug can be fixed without it.


-- 
           Summary: GCC uses a lot of RAM when compiling a large numbers of
                    functions
           Product: gcc
           Version: 4.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jvoss at altsci dot com
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


             reply	other threads:[~2010-06-17  4:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17  4:10 jvoss at altsci dot com [this message]
2010-06-17  4:14 ` [Bug tree-optimization/44563] " jvoss at altsci dot com
2010-06-17 10:37 ` rguenth at gcc dot gnu dot org
2010-06-17 10:45 ` rguenth at gcc dot gnu dot org
2010-06-17 12:28 ` jakub at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-44563-19336@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).