Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Brace expansion performance
- X-seq: zsh-users 14958
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Brace expansion performance
- Date: Mon, 22 Mar 2010 10:22:11 -0700
- In-reply-to: <4BA799B0.2010902@xxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <4BA799B0.2010902@xxxxxxxxx>
On Mar 22, 5:24pm, Radoulov, Dimitre wrote:
}
} does anybody know why the zsh brace expansion (?) performs so ...
} differently?
First make sure "zsh -c" isn't reading some expensive init files that
bash/ksh aren't, but:
I'm pretty sure zsh is actually allocating an array of 300000 integers
during expansion of that expression, and probably copying it a few times.
schaefer[633] strace bash -c 'echo $BASH_VERSION;echo $BASH_VERSION;for i in {1..300000}; do :;done' |& wc
322 1262 17792
schaefer[634] strace Src/zsh -fc 'echo $ZSH_VERSION;for i in {1..300000}; do :;done' |& wc
901381 5408181 43590584
Messages sorted by:
Reverse Date,
Date,
Thread,
Author