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

memory usage with + / e glob qualifiers



Hi,

I was surprised to find out that globs such as **/*(N+false)
that expand to nothing end up using more memory than **/*
according to time's %M

It's even worse when combined with -:

$ du --count-links --inodes --summarize
675285  .

$ (TIMEFMT=%M; time zsh -c ': **/*(N+false)')
225176
$ (TIMEFMT=%M; time zsh -c ': **/*(N-+true)')
370828
$ (TIMEFMT=%M; time zsh -c ': **/*')
159624

With another glob that expands to nothing without using the +
qualifier:

$ (TIMEFMT=%M; time zsh -c ': **/*(N./)')
48176

Similar with the e qualifier:

$ (TIMEFMT=%M; time zsh -c ': **/*(N-e[])')
233312

What could explain that?

-- 
Stephane




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