[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: _AS_DETECT_BETTER_SHELL speedup
From: |
Noah Misch |
Subject: |
Re: _AS_DETECT_BETTER_SHELL speedup |
Date: |
Tue, 1 Feb 2005 13:21:57 -0800 |
User-agent: |
Mutt/1.5.6i |
On Tue, Feb 01, 2005 at 04:46:00PM +0100, Stepan Kasal wrote:
> On Mon, Jan 31, 2005 at 01:47:38AM -0800, Noah Misch wrote:
> > Cygwin /bin/sh executes the former construct in 1/3 the time of the latter.
> I meant "{ ...; } 2>/dev/null" and "(exec ...) 2>/dev/null", of course.
Yes.
> How is it possible that there is so big difference. Both should mean one
> fork with bash. Is it that Cygwin bash doesn't fork with the former
> construct?
>
> Could you please verify this?
Again, I used /bin/sh for the benchmark, and /bin/sh is ash.
> And if there is indeed a difference, could you please measure the overall
> speedup with the patch I mailed to the address@hidden list?
The gain will be very small. You only save a fork when the command in question
does not exist, so typically only the AS_UNAME bits will win. We then save a
half dozen spurious forks. My P3-666 can do those at about 150/s.
If you disagree with that prediction, I will test it.
Thank you for reading and considering my observations.