Re: Tips to compile very very giant code

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

 



Hi!

On Wed, Feb 12, 2025 at 02:01:57PM -0800, Arthur Schwarz wrote:
> I just want to add a small note. Way back in the antediluvian age of 
> software, writing 'big'  functions where the norm (although a 30k 
> functionprobably exceeds what 'norm' normally means). The thought is 
> that if there is some way to do something, someone will do it. Always. 
> Without a thought or hesitation, if there is a facility that can be 
> used, including large functions, someone, somewhere will find that that 
> is just the thing needed.

Very true.  And it *did* work, it compiled in less than ten minutes
even, on (presumably) not a terribly big machine either.

One thing I forgot top mention: don't use -O0 to get better compilation
speed.  If -O2 is too slow try -O1 first.  It gives you way better code
than -O0, and it is less than twice slower typically (it may even be
*faster* if there is a lot of dead code (after inlining), and similar).

-O0 is a simple way to figure out if any of the GCC optimisation passes
changed the output of your program, so it can be helpful during
debugging (of the compiler itself).  It is also the requires POSIX
default if there is no other command line option to override it.


Segher



[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