[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: _AS_DETECT_BETTER_SHELL speedup
From: |
Ralf Wildenhues |
Subject: |
Re: _AS_DETECT_BETTER_SHELL speedup |
Date: |
Sat, 29 Jan 2005 14:58:48 +0100 |
User-agent: |
Mutt/1.4.1i |
* Alexandre Duret-Lutz wrote on Sat, Jan 29, 2005 at 02:07:53PM CET:
> It seems to me that replacing
>
> (foo) 2>/dev/null
>
> by
>
> (exec foo) 2>/dev/null
>
> would also replace two forks by one, and it looks a lot less
> risky.
>
> However my understanding is that modern shells already detect
> these cases and perform the optimization by themselves. I know
> for sure that Zsh has the machinery for this (along with some
> other hairy tricks to limit forks at other places), and, from
> what I can observe from the command line, so does Bash.
Yes, after testing around a little, that is also my observation.
I should have done that before (grumble). The only noticeable
difference I found was when foo was a shell builtin (old shells
and new shells alike).
Sorry, I did not mean to generate so much noise,
Ralf
- Re: _AS_DETECT_BETTER_SHELL speedup, (continued)
- Re: _AS_DETECT_BETTER_SHELL speedup, Stepan Kasal, 2005/01/28
- Re: _AS_DETECT_BETTER_SHELL speedup, Ralf Wildenhues, 2005/01/28
- Re: _AS_DETECT_BETTER_SHELL speedup, Paul Eggert, 2005/01/28
- Re: _AS_DETECT_BETTER_SHELL speedup, Alexandre Duret-Lutz, 2005/01/29
- Re: _AS_DETECT_BETTER_SHELL speedup, Noah Misch, 2005/01/29
- Re: _AS_DETECT_BETTER_SHELL speedup, Alexandre Duret-Lutz, 2005/01/29
- Re: _AS_DETECT_BETTER_SHELL speedup, Noah Misch, 2005/01/29
- Re: _AS_DETECT_BETTER_SHELL speedup, Stepan Kasal, 2005/01/31
- Re: _AS_DETECT_BETTER_SHELL speedup, Stepan Kasal, 2005/01/31
- Re: _AS_DETECT_BETTER_SHELL speedup, Noah Misch, 2005/01/31
- Re: _AS_DETECT_BETTER_SHELL speedup,
Ralf Wildenhues <=
- Re: _AS_DETECT_BETTER_SHELL speedup, Paul Eggert, 2005/01/28
- Re: _AS_DETECT_BETTER_SHELL speedup, Stepan Kasal, 2005/01/29