[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: document AS_BASENAME
From: |
Stepan Kasal |
Subject: |
Re: document AS_BASENAME |
Date: |
Mon, 3 Apr 2006 23:21:28 +0200 |
User-agent: |
Mutt/1.4.1i |
Hello,
I have to apologize; the following argument was bogus:
On Sat, Apr 01, 2006 at 12:14:11PM -0700, Eric Blake wrote:
> According to Stepan Kasal on 4/1/2006 10:13 AM:
> > 3) Pre-computing the as_basename variable saves a subshell in each
> > AS_BASENAME call with a non-trivial argument. So _AS_BASENAME_PREPARE is
> > an efficiency issue, too. (I even considered adding _AS_DIRNAME_PREPARE.)
>
> That's the clincher. Actually, AS_DIRNAME is expanded more frequently
> than AS_BASENAME in coreutils' configure, so I retract my previous
> objection to leaving _AS_BASENAME_PREPARE, and would welcome the addition
> of _AS_DIRNAME_PREPARE.
most modern shells handle (foo) 2>/dev/null with only one fork.
(I tried some versions of ash, bash, zsh and ksh.)
That means that we save a fork only on systems
- without a modern shell but with working basename
- with a shell which interprets `false' as a builtin but without working
basename
> (I do some compatibility development on cygwin running on an old 266 MHz
> Win98 machine, where every fork takes a full second of wall clock time, so
> I know first hand how avoiding extra forks can speed up a shell script.)
More specifically, _AS_DIRNAME_PREPARE did not probably present any speedup
for Cygwin.
Well, but we are in freeze, so I'll let this change in. ;-)
Have a nice day,
Stepan
- Re: document AS_BASENAME, (continued)