in reply to Re^2: Optimizing performance for script to traverse on filesystem
in thread Optimizing performance for script to traverse on filesystem
(I've seen enough benchmark discussions here at the monastery to know that a proper benchmark can be an elusive creature.)
If that benchmark happens to be a valid comparison of the two approaches, it would also be a good exercise for a debugger or profiler session, to see what's causing the difference.
In any case, I definitely don't want to dissuade people from using File::Find or its various derivatives and convenience wrappers -- they do make for much easier solutions to the basic problem, and in the vast majority of cases, a little extra run time is a complete non-issue. (It's just that I've had to face a few edge cases where improving run time when traversing insanely large directories made a big difference.)
|
|---|