Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
One glob (*cbp) slow, other (*1000) fast, why?
- X-seq: zsh-users 21851
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: One glob (*cbp) slow, other (*1000) fast, why?
- Date: Thu, 8 Sep 2016 10:47:48 +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; bh=bigyPstW/E8RoyxblPQknVao1S6LWqWZWk7q7tQiyh0=; b=0hyotV8GpczQ1R+H6noe7DlQqBsprnFXZp4anGNhk8coZqVV9Q0Xrrq8uA4iUnXg8X 8HIKrpdb+cTWtrqmxkvrm/lnc5yrr5w86bQmhsnUFvK2e5h2W6WOhtp23fK7/CoWlWtn eZwCTf72uJ80CfO4kuJ2TEd7Ord3N41sGsWAxyNHP+mxIMoQXNcrb2cHXYNNo7CVIlCM UsCBeofskElSvmk6WdSX7kkXUJl/yXQhC9AynNkNbJ1rCmqFQKhBOfFj6pdx2pwKxkhj 8g64VAE0Np3TEg/b2mMsQfSHFtzDYy2Ib3oHK5U+DuBww5hE4c36QGPxHkIqPipceIBb qOfA==
- 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
Hello,
on a directory with 80000 files (result of touch {1..2000} {1..2000}{a..c})
I do:
typeset -F SECONDS; myst=$SECONDS; tmp=( *cbp(NY1) ); echo $(( (SECONDS -
myst) * 1000 ))
it returns: 80.449999999927968
then I do:
typeset -F SECONDS; myst=$SECONDS; tmp=( *1000(NY1) ); echo $(( (SECONDS -
myst) * 1000 ))
it returns: 0.15299999995477265
Why such a difference?
More:
typeset -F SECONDS; myst=$SECONDS; tmp=( *10000(NY1) ); echo $(( (SECONDS -
myst) * 1000 ))
0.2779999999802385
typeset -F SECONDS; myst=$SECONDS; tmp=( *100000(NY1) ); echo $(( (SECONDS
- myst) * 1000 ))
78.060000000277796
I.e. it starts to be slow at 5 or more zeros.
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author