2006-04-04, 08:56
i found this on digg.com: python speed & performance tips
Quote:python performance tips
this page is devoted to various tips and tricks that help improve the performance of your python programs. wherever the information comes from someone else, i've tried to identify the source.
python has changed in some significant ways since i first wrote my "fast python" page in about 1996, which means that some of the orderings will have changed. i migrated it to the python wiki in hopes others will help maintain it.
note: you should always test these tips with your application and the version of python you intend to use and not just blindly accept that one method is faster than another.
also new since this was originally written are packages like [www] pyrex, [www] psyco, [www] weave and [www] pyinline, which can dramatically improve your application's performance by making it easier to push performance-critical code into c or machine language