Steven D'Aprano <[EMAIL PROTECTED]> writes:
> Actually there is a big speed hit. Until such time that Python has a fast 
> identity function, and lambda x:x isn't it, your version is about three 
> times slower than Bearophile's.

Interesting.  Fixing that speed hit probably needs compiler attention.

> Much to my surprise, the fastest solution I've tried appears to be a pure 
> Python version not even using max() at all.

Could you try the l.index version?  That avoids creating all those
intermediate tuples.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to