in reply to glob() far slower than `dir`
If you need to work with all the files condider sorting the file list by inodes. You'll use disk readahead instead of cache and disk seeks are minimized.sub read_dir_list{ opendir(DIR, '.'); my @all_files = readdir DIR; closedir DIR; my @files = grep /^ABC.*/ @all_files; return @files; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: glob() far slower than `dir`
by halley (Prior) on Feb 21, 2005 at 15:26 UTC |