[Python-Dev] heapq, min and max
Kristján Valur Jónsson
kristjan at ccpgames.com
Wed Oct 22 16:37:29 CEST 2008
Ooops, you are right.
Silly error on my part.
Still, my comment about heapq still stands,
and
[hack, slash]
0.39713821814841893 (old)
0.35184029691278162 (hakced, for special list treatment)
So, there is a 12% performance boost to be had by specializing for lists.
How about it?
K
> -----Original Message-----
> From: python-dev-bounces+kristjan=ccpgames.com at python.org
> [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On Behalf
> Of Antoine Pitrou
> Sent: Wednesday, October 22, 2008 14:06
> To: python-dev at python.org
> Subject: Re: [Python-Dev] heapq, min and max
>
> This is clearly wrong. l.sort() will sort the list in place when it is
> first
> invoked, and therefore will be very fast in subsequent calls.
>
More information about the Python-Dev
mailing list