[Python-ideas] Make Python code read-only
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed May 21 00:44:25 CEST 2014
Victor Stinner wrote:
> Optimizations possible when the code is read-only
> =================================================
>
> * Inline calls to functions.
>
> * Replace calls to pure functions (without side effect) with the
> result. For example, len("abc") can be replaced with 3.
I'm skeptical about how much difference this would make.
In most of the Python code I've seen, calls to module-level
functions are relatively rare -- most calls are method
calls.
--
Greg
More information about the Python-ideas
mailing list