Welcome to the Monastery | |
PerlMonks |
•Re^2: Finding oldest file in directoryby merlyn (Sage) |
on Oct 19, 2004 at 13:04 UTC ( [id://400500]=note: print w/replies, xml ) | Need Help?? |
Careful. The high-water-mark algorithm is actually slower than sorting to get the highest value, for some small number of items. Think of the few lines of Perl code that would have to be repeatedly executed for each item. Then think of how little work it takes directly in C to sort that list instead.
Yes, surprising when I first heard it too. -- Randal L. Schwartz, Perl hacker
In Section
Seekers of Perl Wisdom
|
|