From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id DAA03887 for ; Fri, 15 Nov 1996 03:09:12 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id LAA25354; Thu, 14 Nov 1996 11:05:41 -0500 (EST) Resent-Date: Thu, 14 Nov 1996 11:05:41 -0500 (EST) Message-Id: <199611141605.LAA15253@redwood.skiles.gatech.edu> To: zsh-workers@math.gatech.edu Subject: Re: more problems w/ irix In-reply-to: Your message of "Thu, 14 Nov 1996 15:38:43 GMT." <27656.199611141538@stone.dcs.warwick.ac.uk> Date: Thu, 14 Nov 1996 11:05:35 -0500 From: Richard Coleman Resent-Message-ID: <"pXo_22.0.1C6.KDqYo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2412 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > >It doesn't exec a cat, it does the reading/writing itself (in closemn). > > I'm aware of that. I was responding to the statement that it is > inefficient, saying that "foo "cat a b c | foo". If it isn't, we should make it so. > > >I'm not sure how we could make this more efficient without using something > >like mmap(). > > I think using mmap() would be a good move. An madvise(), as used by > some cats, would also help performance. We can do autoconf checks for > these functions, and would in any case need to have the code fall back > on a read/write loop in case mmap() is impossible. It's been a while since I looked at the source for something like GNU cat, but I remember it being quite a bit of code (relative to what it does). Also I believe it takes quite a bit of work to write portable code that uses mmap(). I think of the multio as more of a convenience, rather than being faster just because it is built into the shell. For scripting purposes (where speed is more important), you can just use "cat a b c | whatever". I think it would be sufficient to just output an error message such as "max multio's is 16", when someone tries "whatever < *". They should use "cat * | whatever" instead. We should probably mention this limit in the man pages. rc