Message266511
BUILD_MAP, BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL need pushing key-value pairs on the stack. If keys and values are not constant, this is correct order of evaluating them. But if keys are constant (very common case), the order of pushing them doesn't affect semantic. We can pack them in constant tuple and push on the stack by one instruction.
I think there would be a benefit from adding new opcodes that take a sequence of values and a tuple of keys instead of a sequence of key-value pairs.
New MAKE_FUNCTION (issue27095) and new CALL_FUNCTION (issue yet not opened) could have a benefit. |
|
Date |
User |
Action |
Args |
2016-05-27 20:40:40 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, Demur Rumed |
2016-05-27 20:40:40 | serhiy.storchaka | set | messageid: <1464381640.82.0.0689379791356.issue27140@psf.upfronthosting.co.za> |
2016-05-27 20:40:40 | serhiy.storchaka | link | issue27140 messages |
2016-05-27 20:40:40 | serhiy.storchaka | create | |
|