This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Suggestion: Use -pipe by default


On Fri, Oct 06, 2000 at 12:43:25PM -0400, Phil Edwards wrote:
> On Fri, Oct 06, 2000 at 03:05:07PM +0200, Niels Möller wrote:
> > Are there still many systems where -pipe doesn't work? I believe it
> > would be a good thing to use -pipe by default.
> 
> I posted a question about this (in August or September I think),
> since this is something which I occasionally try to turn on by default.
> Somebody pointed out to me that, because the compiler and assembler are
> running in parallel, memory usage goes up quite a bit.
> 
> I hadn't really noticed because we have craploads of RAM here, but the
> average user might not want all of RAM and half the swap space given over
> to the build process.  It's something to consider.

When I've tried it, -pipe has consistently been about 5% slower than
temporary files.  This is probably because you get fewer cache
conflicts if the compiler and assembler run sequentially, and also
because the Linux pipe implementation is lame but short-lived temp
files never hit the disk.

I've wondered occasionally if using *unlinked* temp files would be a
better way to go (on platforms that support it, obviously).  gcc.c can
set it all up before execing cpp, cc1, and as.  Having zero link count
is a big fat hint to the OS that it doesn't have to push this inode
out to disk...  Should check if anyone actually uses that hint first,
though.

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]