[Top][All Lists]

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

Re: _AS_DETECT_BETTER_SHELL speedup (was: Re: Proposed doc updates)

From: Ralf Wildenhues
Subject: Re: _AS_DETECT_BETTER_SHELL speedup (was: Re: Proposed doc updates)
Date: Thu, 27 Jan 2005 17:51:33 +0100
User-agent: Mutt/1.4.1i

Hi Stepan,

* Stepan Kasal wrote on Thu, Jan 27, 2005 at 05:29:08PM CET:
> > >   { nonexistent; } 2>/dev/null
> > > and do not output anything with it.  They do fork for the { },
> > ... if the redirection is applied:
> ...
> > > Most newer shells don't fork for the { }, so that gives us a speed
> > > advantage when using { ...; } rather than ( ...).
> This means that a slight speedup of _AS_DETECT_BETTER_SHELL is
> possible; see the attaches patch.


> (Maybe I have discovered something which you already had in mind...)


> Paul, OK to commit the patch?

IFF all shells cope with it, you can change many more places.
Let's see:

  find autoconf/lib -type f | xargs grep ').*dev.null'

For example, all of AS_UNAME could be changed.  Basically, you could
change all occurrences of
  ( whatever ) 2>/dev/null
where `whatever' does not have any side effects for the shell executing
the script.

Within Libtool, there are about 30 places that could be changed.  I have
a patch lying around here for Libtool, all I was waiting for is whether
anybody knows if the { ...;} thingy poses a problem for some old shell.
(If necessary, I could produce a patch for Autoconf.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]