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 42444
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: Performance tests of quoting and dequoting, printf -v turned out slow
- Date: Sun, 11 Mar 2018 00:33:46 -0800
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=F7QC5YUsTmMujuHwfnJc5rSpprvkUZON9+npH9+JBd8=; b=Q4rnaUdIUzozfDsdmp39lQpKC76m46CCRU/3DeBECzWBA4CuUrSJVoHUdzpGMubKfk ioC4nWjJI0XfS9i0Z8C/mMk1PmdiTyx7MWUPK2wcpWxzcBCGCEBrFRB8Hj0ayPpkKW0v aXP7mjDs8Pzwgd4vAnzMq8mkRg9SASGtAHj06H3UOQ2543Rt8t3myCg1gdYevrjSVT9s FDpSWGq16gmdt1+tChtquFzlVbusc2Mb+qIpqfNV57MBsEGamNptlgZVLINjqPzWLe2e nxO4lZ++LcCUjiQtETCDobdcEDqoRRULmJot12J40PPuF3KBXE26cZM/Aw0ixFtjxMi/ nzag==
- In-reply-to: <19380.1520696454@thecus>
- 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> <19380.1520696454@thecus>
On Sat, Mar 10, 2018 at 7:40 AM, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
>
> What may affect things is whether or not zsh was built to use
> open_memstream from libc. FreeBSD and GNU libc have open_memstream.
Indeed:
schaefer[556] Src/zsh -f
% qflag() {
local OUTPUT
repeat 10000; do
OUTPUT="${(q)INPUT}"
done
}
% typeset -F SECONDS=0; qflag; print $SECONDS
0.0282280000
% prtf() {
local OUTPUT
repeat 10000; do
printf -v OUTPUT '%q ' "$INPUT"
done
}
% typeset -F SECONDS=0; prtf; print $SECONDS
3.8363050000
%
schaefer[557] grep -i memstream config.h
/* Define to 1 if you have the `open_memstream' function. */
/* #undef HAVE_OPEN_MEMSTREAM */
Messages sorted by:
Reverse Date,
Date,
Thread,
Author