Mike Meng wrote: > Hi all, > I just finished reading Learning Python 3rd ed, and am doing my > first Python application, which retrieves and process text and XML > documents from Web. Python helped me to write the application in a few > hours, I'm very happy with its productivity. But the performance is not > satisfactory. I decide to optimized it in Python before trying C/C++ > extensions. But I don't know Python much and have no clu to tune my > program. Also, I don't know what Pythonist's preferred styles. Are > there any books/documents which play the similar role for Python as > 'Effective C++' does for C++? > > For example, one of my friends read my program and suggest me to > move the re.compile() out of a for-loop, since the regular pattern is > fixed, and re.compile() is slow. I want to find more such advice, where > can I find them? >
Here's some links to profiling tools http://www.python.org/doc/current/lib/profile.html http://www.onlamp.com/lpt/a/6376 http://www.vrplumber.com/programming/runsnakerun/ http://mail.python.org/pipermail/python-list/2006-January/318295.html -- http://mail.python.org/mailman/listinfo/python-list