A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-October/146654.html below:

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

[Python-Dev] Optimizing list.sort() by checking type in advance [Python-Dev] Optimizing list.sort() by checking type in advanceGreg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 11 00:40:02 EDT 2016
Elliot Gorokhovsky wrote:
> I ran the 
> benchmark a couple of times and the numbers seem to exactly line up 
> something like one in five times; perhaps not that crazy considering 
> they're executing nearly the same code?

Could this be a result of a time being measured in seconds
somewhere and then divided down?

> *** 1e7 ints + 1 float (to disable the optimization while keeping the precheck)***
> F.fastsort(): 7.57237982749939
> F.sort(): 7.666172504425049

This result looks a bit suspicious too -- it's hard to see
how fastsort could be faster even when the optimisation
is not being used.

-- 
Greg

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4