What are the best books on how to optimize and profile Python code?
+4
A:
The Python Essential Reference. But it doesn't have more than the good online reference. In fact hotshot is very easy to use for most cases.
But that will only get you so far. You have to think "pythonic" to achieve better performance. In particular understanding list comprehensions and the different characteristics of all the base data structures of Python. It depends in particular if you are optimizing for size or speed.
alecco
2009-10-31 19:49:28
RedGlyph
2009-10-31 21:34:16
Good find. The reference to Guppy-pe in particular (the review says it only has a paragraph in the book, though.) +1 (Beats my answer hands down :)
alecco
2009-10-31 20:28:51