News for hackers. Stuff that matters.
Re:Perl6: Unary Sort by orblivion on Monday December 23, 2013 @01:10PM (#6955594)
I agree, this wasn't a point about Python vs Perl.

All I'm saying is that the author bills it as not wanting to run { .lc } twice per comparison. What I'm adding is that the comparison function itself, even if trivial, arguably has a bit of an overhead just from calling it. Thus, having O(n) calls to a key function { .lc } may be better than O(n log n) calls to a comparison function {.lc <=> .lc}.

At least that's how people convinced me to use key= instead of cmp= in Python.

There are no comments on this comment yet.