Eric Wong <normalperson / yhbt.net> wrote:
> $ strace -c -e getdents ruby --disable=gems -e 'Dir.glob("*/*.{flac}")'
> => 935 getdents calls
> 
> $ strace -c -e getdents ruby --disable=gems -e 'Dir.glob("*/*.{flac,ogg}")'
> => 1870 getdents calls
> 
> $ strace -c -e getdents ruby --disable=gems -e 'Dir.glob("*/*.{flac,ogg,mp3}")'
> => 2805 getdents calls

ksh93, zsh, bash all exhibit the same behavior, even.
And it appears a major refactoring of dir.c is necessary to
support optimizing away redundant readdir (getdents on Linux) calls.

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>