[Python-Dev] Optimizing list.sort() by checking type in advance (original) (raw)
Nathaniel Smith njs at pobox.com
Mon Oct 10 16:53:19 EDT 2016
- Previous message (by thread): [Python-Dev] Optimizing list.sort() by checking type in advance
- Next message (by thread): [Python-Dev] Optimizing list.sort() by checking type in advance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Oct 10, 2016 at 1:42 PM, Elliot Gorokhovsky <elliot.gorokhovsky at gmail.com> wrote:
*** 10 strings *** F.fastsort(): 1.6689300537109375e-06 F.sort(): 1.6689300537109375e-06
I think something has gone wrong with your timing harness...
For accurately timing microbenchmarks, you should use timeit, or better yet Victor Stinner's perf package: https://perf.readthedocs.io/
-n
-- Nathaniel J. Smith -- https://vorpus.org
- Previous message (by thread): [Python-Dev] Optimizing list.sort() by checking type in advance
- Next message (by thread): [Python-Dev] Optimizing list.sort() by checking type in advance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]