From: Eric Wong Date: 2017-07-24T21:40:24+00:00 Subject: [ruby-core:82155] Re: [Ruby trunk Bug#13167] Dir.glob is 25x slower since Ruby 2.2 Eric Wong 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: