views:

258

answers:

2

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
RedGlyph
+4  A: 

I have found this one:

Expert Python Programming

with this review

http://www.artima.com/weblogs/viewpost.jsp?thread=240415

Nadir SOUALEM
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
@aleccolocco :Thank You :-)
Nadir SOUALEM