Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Performance tests of quoting and dequoting, printf -v turned out slow
- X-seq: zsh-workers 42437
- From: Sebastian Gniazdowski <psprint@xxxxxxxxxxx>
- To: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- Subject: Re: Performance tests of quoting and dequoting, printf -v turned out slow
- Date: Fri, 9 Mar 2018 14:39:10 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- In-reply-to: <etPan.5aa28b1e.77e79f33.159ee@AirmailxGenerated.am>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <etPan.5aa22836.70671812.159ee@zdharma.org> <etPan.5aa28b1e.77e79f33.159ee@AirmailxGenerated.am>
On 9 marca 2018 at 14:23:44, Stephane Chazelas (stephane.chazelas@xxxxxxxxx) wrote:
> I can't reproduce with zsh 5.4.2 (x86_64-debian-linux-gnu)
> compared with 4.4.18(1)-release (x86_64-pc-linux-gnu).
> in a en_GB.UTF-8 locale.
>
> FWIW, I find:
>
> $ time INPUT='ice as"program" pick"$ZPFX/bin/prll_(qer|bfr)" src"prll.sh" make"install
> PREFIX=$ZPFX"' bash -c 'for ((i = 0; i < 50000; i++)); do printf -v OUTPUT %q "$INPUT";
> done'
> INPUT= bash -c 1.48s user 0.00s system 99% cpu 1.485 total
> $ time INPUT='ice as"program" pick"$ZPFX/bin/prll_(qer|bfr)" src"prll.sh" make"install
> PREFIX=$ZPFX"' zsh -c 'for ((i = 0; i < 50000; i++)); do printf -v OUTPUT %q "$INPUT"; done'
> INPUT= zsh -c 0.83s user 0.14s system 99% cpu 0.979 total
>
> What's your version and locale?
5.3.1, I looked also at 5.4.2 and the results were the same. For your snippets I get the same results as you. If I source short.zsh, I again get ~25 sec time. I will find some time to narrow this shortly.
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author