Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ZSH performance regression in 5.8.1.2-test
- X-seq: zsh-workers 50123
- From: Jordan Patterson <jordanp@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: ZSH performance regression in 5.8.1.2-test
- Date: Wed, 27 Apr 2022 13:54:21 -0600
- Archived-at: <https://zsh.org/workers/50123>
- In-reply-to: <CAH+w=7bb+3T5MabhmCS9BwC7XmTxmydxQ5GLy7R7+6f6B7-=EA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHDOzW6wE2aP6-MMrBNAUYttzQwi2VC_OY7tJDwkQwrtp47zEQ@mail.gmail.com> <CAH+w=7YwV=Cu1N7dSb417R1Q0vAMu6R6hAryXqE4RBkmU_w5gA@mail.gmail.com> <20220425192036.p6awbyro2a2lp7bq@chazelas.org> <CAH+w=7Yz-usT3nbbOW8o-awgZ_EKYVDaM_VVhyKYwaiOdxRzzw@mail.gmail.com> <CAH+w=7bb+3T5MabhmCS9BwC7XmTxmydxQ5GLy7R7+6f6B7-=EA@mail.gmail.com>
I'm not subscribed to the mailing list so I'm missing Jun's original
email, but I'll reply here.
> Jordan, what do you get by the following?
> zsh -xic exit 2>>(wc)
I get 13007 lines, 1534161 characters.
> Can you try the lseek() patch (in my previous post, 50115)?
Sure. I needed to add a mode argument to the open in your lseek
configure check. I get this error otherwise on my system:
error: call to '__open_missing_mode' declared with attribute error:
open with o_creat or o_tmpfile in second argument needs 3 arguments
My benchmark results:
Benchmark 1: prefix/5.8/bin/zsh -i -c exit
Time (mean ± σ): 254.6 ms ± 10.0 ms [User: 174.6 ms, System: 68.0 ms]
Range (min … max): 240.1 ms … 271.7 ms 10 runs
Benchmark 2: prefix/5.8.1/bin/zsh -i -c exit
Time (mean ± σ): 251.7 ms ± 8.8 ms [User: 179.2 ms, System: 60.0 ms]
Range (min … max): 233.3 ms … 262.5 ms 11 runs
Benchmark 3: prefix/5.8.1.2-test/bin/zsh -i -c exit
Time (mean ± σ): 2.583 s ± 0.053 s [User: 0.516 s, System: 2.033 s]
Range (min … max): 2.540 s … 2.687 s 10 runs
Benchmark 4: prefix/5.8.1.2-test-lseek/bin/zsh -i -c exit
Time (mean ± σ): 283.8 ms ± 8.0 ms [User: 202.7 ms, System: 70.4 ms]
Range (min … max): 273.0 ms … 300.3 ms 10 runs
Summary
'prefix/5.8.1/bin/zsh -i -c exit' ran
1.01 ± 0.05 times faster than 'prefix/5.8/bin/zsh -i -c exit'
1.13 ± 0.05 times faster than 'prefix/5.8.1.2-test-lseek/bin/zsh -i -c exit'
10.27 ± 0.41 times faster than 'prefix/5.8.1.2-test/bin/zsh -i -c exit'
On Tue, Apr 26, 2022 at 1:01 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Mon, Apr 25, 2022 at 2:27 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > Theoretically we can block-read with impunity in cases 1 and 2 (anyone
> > disagree?). Testing for seek-ability would allow doing the "read too
> > much and back up" trick in case 3. I don't immediately see any way to
> > avoid reading one byte at a time in case 4, does anyone have a
> > suggestion?
>
> Try this?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author