Thought this was cool: Guido van Rossum – Google+ – Some patterns for fast Python. Know any others? – Avoid…
RAM (in-process dict) < memcached < disk IO < net IO – a good caching strategy saves lives.
Know your APIs: Disk IO, DB hits, or any network trips are (almost) always more expensive than any calculations you’re doing – getting a thousand records can be quite fast (with modern DBs), but getting one record a thousand times is almost always intolerably slow – so watch your loops!
If you’re crunching numbers, numpy is your friend (and so are its buddies, cython and pypy). If you’re not, none of these tips probably apply to you, unless you have some crazy nano-second scale requirements for your libraries – and if so – Python may not be the best language! All languages are tools, and some tools are better suited to certain tasks than others.
Lastly, readability and maintainability always trumps performance – always – until performance is your only concern. In my experience, that almost never, ever happens. As long as you’re not writing poor-performing code (for instance, hitting a DB in a large loop), you’re going to be fine, until it’s time to profile!