Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: more problems w/ irix



> >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 <a <b <c" should be more efficient than
> "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



Messages sorted by: Reverse Date, Date, Thread, Author