Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Extended globbing seems to have become much slower in recent versions of Zsh



I have run 5.2, compiled with and without the --with-stack-allocation flag.
It made no difference however. You can see that the runs below are very
similar in the measured times.

With "--with-stack-allocation":

% zsh --version
zsh 5.2 (x86_64-apple-darwin14.5.0)

% /usr/local/bin/zsh -f
% setopt EXTENDED_GLOB; float SECONDS MYNOW

% MYNOW=$SECONDS; :
**/*~(|*/)(build|target|node|node_modules|.idea|*.min.js|*.iml|TAGS)(|/*)(-.D);
print $(( $SECONDS - $MYNOW ))
54.868589

% MYNOW=$SECONDS; :
(#i)**/*~(|*/)(build|target|node|node_modules|.idea|*.min.js|*.iml|TAGS)(|/*)(-.D);
print $(( $SECONDS - $MYNOW ))
47.001608000000019

% MYNOW=$SECONDS; :
**/*~(|*/)(build|target|node|node_modules|.idea|*.min.js|*.iml|TAGS)(|/*);
print $(( $SECONDS - $MYNOW ))
38.805462000000006

% MYNOW=$SECONDS; :
(#i)**/*~(|*/)(build|target|node|node_modules|.idea|*.min.js|*.iml|TAGS)(|/*);
print $(( $SECONDS - $MYNOW ))
32.296016000000009

-------------------------------------------------------

Without "--with-stack-allocation":

% /usr/local/bin/zsh --version
zsh 5.2 (x86_64-apple-darwin14.5.0)

% /usr/local/bin/zsh -f
% setopt EXTENDED_GLOB; float SECONDS MYNOW

% MYNOW=$SECONDS; :
**/*~(|*/)(build|target|node|node_modules|.idea|*.min.js|*.iml|TAGS)(|/*)(-.D);
print $(( $SECONDS - $MYNOW ))
53.115647000000003

% MYNOW=$SECONDS; :
(#i)**/*~(|*/)(build|target|node|node_modules|.idea|*.min.js|*.iml|TAGS)(|/*)(-.D);
print $(( $SECONDS - $MYNOW ))
42.988532000000006

% MYNOW=$SECONDS; :
**/*~(|*/)(build|target|node|node_modules|.idea|*.min.js|*.iml|TAGS)(|/*);
print $(( $SECONDS - $MYNOW ))
36.619570999999993

% MYNOW=$SECONDS; :
(#i)**/*~(|*/)(build|target|node|node_modules|.idea|*.min.js|*.iml|TAGS)(|/*);
print $(( $SECONDS - $MYNOW ))
30.786290000000008


On Thu, Mar 3, 2016 at 1:06 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
wrote:

> On Wed, Mar 2, 2016 at 12:39 AM, Jesper Nygårds
> <jesper.nygards@xxxxxxxxx> wrote:
> > Previously I was using the Apple-provided version of 5.0.5, and the
> > Homebrew version of 5.2. Now I have instead used different versions of
> > Homebrew zsh, and I have made sure that the compiler flags were the same
> > through all versions. I have then run the same tests again, with versions
> > 5.0.5, 5.0.6, 5.1 and 5.2.
>
> OK, thanks; next thing to try:  configure --with-stack-allocation
>
> I've scanned through diffs and I just don't see any structural changes
> that would account for that slowdown; the above is a bit of a
> longshot.
>
> Incidentally (for -workers) there's a typo in ChangeLog -- 32932:
> Src/glob.c -- should say Src/subst.c.
>


Messages sorted by: Reverse Date, Date, Thread, Author