python 3's adoption
Jonathan Gardner
jgardner at jonathangardner.net
Wed Jan 27 19:16:59 EST 2010
On Jan 27, 3:54 pm, Paul Rubin <no.em... at nospam.invalid> wrote:
> Steven D'Aprano <ste... at REMOVE.THIS.cybersource.com.au> writes:
> > always much better written with key rather than cmp: key adds an O(N)
> > overheard to the sorting, while cmp makes sorting O(N**2).
>
> Whaaaaaaaaaa ...... ???? No I don't think so.
You're referring to the O(N**2) bit, right? I am sure he knew it was O
(N*log(N)), which is still worse than O(N) for key.
If he didn't, well, Python has some fundamental flaws in its basic
sort algorithm.
More information about the Python-list
mailing list