Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ZSH performance regression in 5.8.1.2-test
On Wed, Apr 27, 2022 at 7:00 AM Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>
> Then run the following 5 test (in the tmpdir):
> (1) time ZDOTDIR=. zsh -ic exit
> (2) time zsh -f tmp.txt
> (3) time zsh -f < tmp.txt
> (4) time echo 'source tmp.txt' | zsh -f
> (5) time cat tmp.txt | zsh -f
Does it matter to (3) if "zsh -fs" ?
> With lseek() patch we get "reasonable" performance for (1)-(4).
> (3) is somewhat slower, because it is reading form stdin and
> need to call lseek() many times.
I wonder if it would help to read less than SHINBUFSIZE when
SHINSTDIN. E.g., make some guess at the "average line length" and
read that many bytes. Might cause more calls to memchr() but less I/O
(and shorter lseek()s, if that matters).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author