Mark Shannon <m...@hotpy.org> added the comment:

There seems to be an implicit assumption here that fewer bytecodes is better. 
But that isn't always the case.

Do you have evidence that the sequence 
0 LOAD_CONST               5 ((('a', 'b', 'c'), 3, 2, 1))
2 UNPACK_SEQUENCE          4
is actually faster than
0 LOAD_CONST               0 (1)
2 LOAD_CONST               1 (2)
4 LOAD_CONST               2 (3)
6 LOAD_CONST               3 (('a', 'b', 'c'))
?

The second sequence has more bytecodes, but the first has to create a new 
object.

I think you ought to be careful using the word "optimize" unless the output is 
incontrovertibly superior.

----------
nosy: +Mark.Shannon

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33325>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to