Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Substitution ${...///} slows down when certain UTF character occurs
- X-seq: zsh-workers 36637
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Substitution ${...///} slows down when certain UTF character occurs
- Date: Sat, 26 Sep 2015 14:19:42 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=plqjMue0bL6lGLrHseYvF6PSClJK5NX3GsB1kVLX4wc=; b=pm7Q+4rIRX3CJmgAZ1F1Ol92DzzzoajZBuU+O6MYNGUuDftwoLHyci0pW4hKDTSLXQ YUR3Iu9CM44ghHMFmNN5FNqQVokE/NoCpc8Lr+6M2TZWLcujbGDugiIHndA2JYH2yrJe y0pddE7QowqfYk9VEsspHpn7vCfeO+wGNQN5t3dgP/RI5myeHQhSJ7TvzalkY1AoVltm tlJAi6QPt404mKjZbCiHU2Od0MoL31A7NoPi4talv+Iv0uzCrR3AFGM//PB33N4f9YEc j57GgCpnO2VuKT/NByoIl83ME19l3oCyOiZGBpPBF1GTMDZq6u7h7sBwihlB6pDCP2Mw rn+g==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hello
Half of the following example characters will cause the slowdown: –,
¥, Ń, Ł, Ǎ, Ǟ. I attach a script that does ${...///} substitution. It
is very slow for some chars and very fast for others. How to explain
and hopefully fix this?
Example script result:
( out_array=("${str//(#bi)wfeiwj/a}") ; ) 0,02s user 0,00s system 97%
cpu 0,017 total
( out_array=("${str//(#bi)wfeiwj/a}") ; ) 0,89s user 0,00s system 99%
cpu 0,890 total
( out_array=("${str//(#bi)wfeiwj/a}") ; ) 3,70s user 0,01s system 99%
cpu 3,712 total
( out_array=("${str//(#bi)wfeiwj/a}") ; ) 5,73s user 0,01s system 99%
cpu 5,743 total
Best regards,
Sebastian Gniazdowski
Attachment:
test-script.zsh
Description: Binary data
Messages sorted by:
Reverse Date,
Date,
Thread,
Author