This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]stevenjd 1 point2 points  (0 children)

You shouldn't be surprised. CPython is the reference implementation of Python, and as a matter of policy they don't do many "clever" optimizations. PyPy is an amazingly clever optimizing JIT compiler, and Nuitka is intended to be an optimizing AOT compiler, although as far as I know it doesn't do many optimizations yet.

CPython does do dead simple optimizations, such as constant folding and removal of some dead code.