Re: Reducing compilation memory usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tony Wetmore wrote:
Alejandro Pulver wrote:
 >> RAM!  Of course we could make gcc more economical, and
 >> we could somewhat reduce memory usage, but you're asking
 >> for something really hard.
 >
 > I wasn't asking to change the program, I was just asking
 > if there is an already existing option.

I think Andrew may have meant that you are asking GCC to do something really hard, to optimize a single function that is so large. And asking the compiler to do something that hard has a price -- it requires lots of memory, as you have discovered.

I was saying exactly that, thank you for clarifying.

The thing to realize is that it is really hard to do a great job of optimizing
huge functions.  So, it's quite likely that gcc will do a better job of
optimizing a bunch of small functions, with well-contained locality of variables,
than one huge function.

OK, so you will have the overhead of a function call.  But on most architectures
that isn't enormous.

Andrew.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux