This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Suggestion: Use -pipe by default
- To: pedwards at disaster dot jaj dot com (Phil Edwards)
- Subject: Re: Suggestion: Use -pipe by default
- From: Bourne-again Superuser <toor at dyson dot jdyson dot com>
- Date: Fri, 6 Oct 2000 15:52:56 -0500 (EST)
- Cc: nisse at lysator dot liu dot se ([Niels M_ller]), gcc-bugs at gcc dot gnu dot org
Phil Edwards said:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> 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.
>
I suspect that the performance issue is also related to the amount of
processor cache available on commodity PC's. I have played with the -pipe
scheme and it appears to provide an essentially neutral peformance
improvement (on PCs running FreeBSD) -- unlike some people, a few percent
improvement or decrease on short compiles isn't important to me :-). If
it makes a few percent difference on the long compiles, then I'd be alot
more interested :-). On SMP, an explict make -jN provides a much bigger
gain. I have even noticed an improvement during make -jN during compiles
on UP machines, probably due to better parallism. The -pipe would
probably work alot better if the ends of the pipe were more balanced
in compile time overhead, and/or one of the ends was blocked by I/O a
significant amount of time (depending on hardware config -- SMP vs. UP,
etc.) I suspect that most sysadmins either use a filesystem mounted
async or a tmp-type filesystem for the transient /tmp anyway... Given
a system that is tuned for compiles, and filesystems set-up for
them, -pipe is probably more of a headache than gain. (I especially
agree with that statement, when running large compiles on systems
with small-middle sized systems, nowadays <128MB.) An ancient
anecdote contrary to worries about small systems, even when
compiling 'normal' files on FreeBSD using 8-16MB system memory, the performance
drop when using -pipe wasn't disaster, but was significant. I suspect that
Linux and other OSes would be similar in this regard.
Another argument for -pipe (implied by another contributor to this thread), is
to minimize the use of the /tmp or /var/tmp for minor security
improvement... (I know that such things aren't the be-all, end-all
of security, but it might contribute to discouraging people who snoop
on others.) There are some OS things that might improve the situation,
or perhaps redirecting the compilers /tmp to somewhere more 'secure' -- but
this isn't really the issue being discussed.
John