Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

Interesting. What code did you use to collect statistics? I used patches in 
issue27255. Perhaps it is worth to add an optionally compiled code for 
collecting dynamic opcode statistics permanently.

We have around 125 opcodes, so 0.5% looks too small. But what is the range of 
that opcode? How many opcodes are more frequent? And what is the range of 
BINARY_ADD for comparison.

RETURN_CONST or RETURN_NONE was already discussed before. They can save few 
bytes in bytecode, but they are never used in tight loops and the time 
difference is dwarfed by the frame creation overhead in any case.

For frequently used pairs of opcodes we have the PREDICT() macros which reduces 
overhead.

----------

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

Reply via email to