zsh-workers
 help / color / mirror / code / Atom feed
From: Jordan Patterson <jordanp@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: ZSH performance regression in 5.8.1.2-test
Date: Wed, 27 Apr 2022 13:54:21 -0600	[thread overview]
Message-ID: <CAHDOzW5iJ2UJ7yKOs08knymPFkT-cursD2_y79KRYkWVepbHLw@mail.gmail.com> (raw)
In-Reply-To: <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@brasslantern.com> wrote:
>
> On Mon, Apr 25, 2022 at 2:27 PM Bart Schaefer <schaefer@brasslantern.com> 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?


  parent reply	other threads:[~2022-04-27 19:55 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 18:16 Jordan Patterson
2022-04-25 18:56 ` Bart Schaefer
2022-04-25 19:20   ` Stephane Chazelas
2022-04-25 21:27     ` Bart Schaefer
2022-04-26  7:01       ` Bart Schaefer
2022-04-26  8:31         ` Peter Stephenson
2022-04-27  0:33           ` Bart Schaefer
2022-04-27 14:11           ` Stephane Chazelas
2022-04-27 15:02             ` Bart Schaefer
2022-04-27 15:07               ` Peter Stephenson
2022-04-27 15:17                 ` Bart Schaefer
2022-04-26 14:31         ` Jun. T
2022-04-26 15:15           ` Peter Stephenson
2022-04-27  0:55             ` Bart Schaefer
2022-04-27  9:16               ` Jun T
2022-04-27  0:38           ` Bart Schaefer
2022-04-27  9:34             ` Peter Stephenson
2022-04-27 10:28               ` Jun T
2022-04-27 12:42                 ` Jun T
2022-04-27 13:58                 ` Jun T
2022-04-27 15:25                   ` Bart Schaefer
2022-04-27 16:18                     ` Jun. T
2022-04-27 19:54         ` Jordan Patterson [this message]
2022-04-28  9:53           ` Jun T
2022-04-28 14:56             ` Bart Schaefer
2022-04-28 18:51           ` Jun. T
2022-04-29  0:28             ` Bart Schaefer
2022-04-29  2:25               ` Jun. T
2022-04-26  1:08 ` Bart Schaefer
2022-04-26  3:03   ` Jordan Patterson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHDOzW5iJ2UJ7yKOs08knymPFkT-cursD2_y79KRYkWVepbHLw@mail.gmail.com \
    --to=jordanp@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).