Message281885
Currently the compiler produces BUILD_MAP_UNPACK with an argument at most 255. If needed to merge more than 255 dictionaries, BUILD_MAP_UNPACK is called several times. But this is unneeded complication since BUILD_MAP_UNPACK doesn't have a limitation on its argument. Seems this code is the remnants from the patches when there was not the opcode BUILD_MAP_UNPACK_WITH_CALL, and BUILD_MAP_UNPACK packed the position of function name in higher bits of its argument.
Proposed patch simplifies the compiler, makes the bytecode faster if merge more than 255 dictionaries and more compact if merge more than 509 dictionaries.
BUILD_MAP_UNPACK was introduced in issue2292. |
|
Date |
User |
Action |
Args |
2016-11-28 16:45:09 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, brett.cannon, georg.brandl, ncoghlan, benjamin.peterson, Joshua.Landau, yselivanov, NeilGirdhar |
2016-11-28 16:45:09 | serhiy.storchaka | set | messageid: <1480351509.39.0.820702291303.issue28823@psf.upfronthosting.co.za> |
2016-11-28 16:45:09 | serhiy.storchaka | link | issue28823 messages |
2016-11-28 16:45:09 | serhiy.storchaka | create | |
|