David Di Biase wrote:
When you say slightly, is it enough to make a difference? Why would getitems be faster even - not sure I can think why...


Using key is faster than cmp because key is called just once for each item whereas cmp is called once for each of the O(nlogn) compares.

Operator.itemgetter is written in C and hence should be faster than a wrapper written in Python.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to