[Python-ideas] Optimizing list.sort() by checking type in advance

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 11 01:20:56 EDT 2016


Elliot Gorokhovsky wrote:
> if the list is all 
> floats, just copy all the floats into a seperate array, use the standard 
> library quicksort, and then construct a sorted PyObject* array.

My question would be whether sorting list of just floats
(or where the keys are just floats) is common enough to
be worth doing this.

-- 
Greg


More information about the Python-ideas mailing list