[issue33325] Optimize sequences of constants in the compiler
Serhiy Storchaka
report at bugs.python.org
Tue Nov 20 13:31:42 EST 2018
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
Good point! Thank you Mark for your comment.
In theory, fewer bytecodes is better (the first example doesn't create a new object, it operates with references to existing objects). But in practice the difference is very small and overwhelmed by random factors. We need hundreds or thousands of constants to get a stable result. This is far from a common use case.
----------
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33325>
_______________________________________
More information about the Python-bugs-list
mailing list