Perl Monk, Perl Meditation | |
PerlMonks |
Re: Re: Re: Fast/Efficient Sort for Large Filesby cecil36 (Pilgrim) |
on Dec 19, 2002 at 17:35 UTC ( [id://221185]=note: print w/replies, xml ) | Need Help?? |
I wrote a program in C++ to sort web server cache logs by IP address. I discovered that a quicksort took forever to sort the data by the IP address, but a heapsort routine that I had in a programming manual was more efficient. If possible, see if you can utilize a binsort routine. If I recall my algorithms class correctly, binsort runs in O(n) time.
In Section
Seekers of Perl Wisdom
|
|