Surprising (for me) benchmark results...

Rainer Deyke root at rainerdeyke.com
Tue May 1 21:11:50 EDT 2001


"Daniel Berlin" <dan at www.cgsoftware.com> wrote in message
news:mailman.988762570.8591.python-list at python.org...
> Actually, the sort is probably not the bottleneck.
> As the file gets larger, the bottleneck becomes disk time, not sort time.

Disk access is O(N); sorting is typically O(N log N).  Therefore as the
number of entries in the file size increases, the time taken by the sort
becomes more significant and the time taken by disk access becomes less
significant.  This is assuming that the file fits into memory (as was the
case here).


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list