[issue38381] Possible wordcode optimization for STORE/LOAD pairs

2020-12-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38381] Possible wordcode optimization for STORE/LOAD pairs

2019-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I thought about this. But STORE_FAST x is followed by LOAD_FAST x just by accident. If you change the expression (1+x**2 or f(x**2)) they no longer be neighbors. I am not sure this pattern is common enough. There are more common pairs. Also, note that

[issue38381] Possible wordcode optimization for STORE/LOAD pairs

2019-10-05 Thread Raymond Hettinger
New submission from Raymond Hettinger : In the show code below, the STORE_FAST x is FOLLOWED by LOAD_FAST x. This is a common word code pairing. Perhaps a new combined opcode would help: case TARGET(LOAD_AND_STORE_FAST): { PyObject *value = GETLOCAL(oparg);