Python 3.13.0 speed

Don’t do it :wink:. It’s extreme micro-optimization (yes, to change global lookups to local), and doesn’t help at all under the PyPy implementation.

For “normal code”, I never do this anymore. In context, I wanted to do everything possible to put CPython and PyPy on a level playing field.

1 Like

the ‘builtins as locals’ micro-optimization actually makes things slightly slower on pypy.

3 Likes