I am not worried about functions defined by me, but built-in functions or esp. ones from imported modules. Basically, do these pieces of advice still apply?
http://wiki.python.org/moin/PythonSpeed/PerformanceTips#Avoiding_dots...
http://wiki.python.org/moin/PythonSpeed/PerformanceTips#Local_Variables
I think the JIT of PyPy could have helped me here too, but I need to run the thing on a Linux cluster (and my source is for Py3k already).
Yes. The exact version doesn't matter much. These optimizations all boil down to minimizing the use of language features with semantics that prohobit simple and efficient implementations for the general case (which is all an interpreter cares about, while a JIT-compiler can generate better code for specific cases). Specifically:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.