in reply to greater efficiency required (ls, glob, or readdir?)
ls sorts the list of files by default. If you don't care about the order of the files you can shave off a bit of time. ls -f will turn off sorting.
The difference you see will depend on your filesystem and you will have to try it out to see how much faster it is. In my experience there is a small difference with ReiserFS but there is a noticeable difference with Solaris UFS.
The difference you see will depend on your filesystem and you will have to try it out to see how much faster it is. In my experience there is a small difference with ReiserFS but there is a noticeable difference with Solaris UFS.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: greater efficiency required (ls, glob, or readdir?)
by Hue-Bond (Priest) on Aug 28, 2008 at 05:51 UTC |
In Section
Seekers of Perl Wisdom