From: Sebastian Gniazdowski <psprint@zdharma.org>
To: Stephane Chazelas <stephane.chazelas@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Performance tests of quoting and dequoting, printf -v turned out slow
Date: Sat, 10 Mar 2018 17:53:22 +0100 [thread overview]
Message-ID: <etPan.5aa40d82.128dbbce.159ee@zdharma.org> (raw)
In-Reply-To: <etPan.5aa3f656.1efba338.159ee@AirmailxGenerated.am>
On 10 marca 2018 at 16:03:11, Stephane Chazelas (stephane.chazelas@gmail.com) wrote:
> More importantly here, the difference is that you have that code
> interpreted by your interactive shell that has read your
> ~/.zshrc, while the "time" version starts a new non-interactive
> shell that doesn't read ~/.zshrc to interpret the code.
>
> There is probably something in your interactive shell
> environment that is causing that.
Before sending email I've created script.zsh with #!/usr/local/bin/zsh-5.3.1 shebang and pasted the code, it was still slow.
> What do you see, if you run:
>
> (set -x; repeat 5 printf -v x x)
% (set -x; repeat 5 printf -v x x)
+/usr/local/bin/zsh-5.3.1-dev-0:130> printf -v x x
+/usr/local/bin/zsh-5.3.1-dev-0:130> printf -v x x
+/usr/local/bin/zsh-5.3.1-dev-0:130> printf -v x x
+/usr/local/bin/zsh-5.3.1-dev-0:130> printf -v x x
+/usr/local/bin/zsh-5.3.1-dev-0:130> printf -v x x
> What's the output of:
>
> type printf
> trap
"printf is a shell builtin"
<empty output>
> Do you get the same behaviour if you run that same code after
> "zsh -f" (a new interactive shell instance that doesn't read
> your ~/.zshrc)?
Yes, it is still slow after /usr/local/bin/zsh-5.3.1 -f. I've recorded this: https://asciinema.org/a/X2T0PlE62gVh363c5oOZeckTz
> --
> Stephane
>
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
next prev parent reply other threads:[~2018-03-10 16:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 6:22 Sebastian Gniazdowski
2018-03-09 13:23 ` Stephane Chazelas
[not found] ` <etPan.5aa28b1e.77e79f33.159ee@AirmailxGenerated.am>
2018-03-09 13:39 ` Sebastian Gniazdowski
2018-03-09 14:53 ` Stephane Chazelas
2018-03-10 8:36 ` Sebastian Gniazdowski
2018-03-10 15:03 ` Stephane Chazelas
[not found] ` <etPan.5aa3f656.1efba338.159ee@AirmailxGenerated.am>
2018-03-10 16:53 ` Sebastian Gniazdowski [this message]
2018-03-10 15:40 ` Oliver Kiddle
2018-03-11 8:33 ` Bart Schaefer
2018-03-13 11:28 ` Sebastian Gniazdowski
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=etPan.5aa40d82.128dbbce.159ee@zdharma.org \
--to=psprint@zdharma.org \
--cc=stephane.chazelas@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).