[Python-Dev] performance testing recommendations in devguide

Eric Snow ericsnowcurrently at gmail.com
Wed May 29 20:00:44 CEST 2013


The devguide doesn't have anything on performance testing that I could
find.  We do have a number of relatively useful resources in this
space though, like pybench and (eventually) speed.python.org.  I'd
like to add a page to the devguide on performance testing, including
an explanation of our performance goals, how to test for them, and
what tools are available.

Tools I'm aware of:
* pybench (relatively limited in real-world usefulness)
* timeit module (for quick comparisions)
* benchmarks repo (real-world performance test suite)
* speed.python.org (would omit for now)

Things to test:
* speed
* memory (tools? tests?)

Critically sensitive performance subjects
* interpreter start-up time
* module import overhead
* attribute lookup overhead (including MRO traversal)
* function call overhead
* instance creation overhead
* dict performance (the underlying namespace type)
* tuple performance (packing/unpacking, integral container type)
* string performance

What would be important to say in the devguide regarding Python
performance and testing it?  What would you add/subtract from the
above?  How important is testing memory performance?  How do we avoid
performance regressions?  Thanks!

-eric


More information about the Python-Dev mailing list