From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id CAA05958 for ; Mon, 26 Aug 1996 02:24:53 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id MAA12323; Sun, 25 Aug 1996 12:21:43 -0400 (EDT) Resent-Date: Sun, 25 Aug 1996 12:21:43 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960825092240.ZM2359@candle.brasslantern.com> Date: Sun, 25 Aug 1996 09:22:39 -0700 In-Reply-To: Zoltan Hidvegi "Re: The speed of zsh" (Aug 25, 4:25pm) References: <199608251425.QAA25213@hzoli.ppp.cs.elte.hu> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.729 29jul96) To: Zoltan Hidvegi Subject: Re: The speed of zsh Cc: zsh-workers@math.gatech.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"gh8mD.0.T03.Ms78o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2069 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Aug 25, 4:25pm, Zoltan Hidvegi wrote: } Subject: Re: The speed of zsh } } > } Somehow ksh spawns external commands twice as fast as zsh. } > } > I suspect it has something to do with zsh's use of pipes for synchronizing } > parent and child processes } } It the script I tried there was only a process substitution which does not } use synch pipes. I was never sure whether you were always talking about that script or if you'd done some other profiling as well. My remark wasn't specific to the script. } Anyway I did remove synch calls and it did make zsh a bit } faster even when it executed scripts which never before used synch perhaps } because of the better use of CPU cache. [...] } } Attached is the patch to remove pipe synchronization code. This needs to be tested carefully to make sure various combinations of piping to and from builtin loops and simple builtins still work right, and to make sure zsh still returns the correct exit status from pipelines where later elements exit before earlier elements are finished; especially pipelines where a command on the rhs (or in the middle) fails to execute and therefore exits immediately. I forget all the reasons why the pipe-sync stuff was added long ago, but I think those were the kinds of situations involved. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"