This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Joshua.Landau, NeilGirdhar, benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, serhiy.storchaka, yselivanov
Date 2016-11-28.16:45:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480351509.39.0.820702291303.issue28823@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-11-28 16:45:09serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, georg.brandl, ncoghlan, benjamin.peterson, Joshua.Landau, yselivanov, NeilGirdhar
2016-11-28 16:45:09serhiy.storchakasetmessageid: <1480351509.39.0.820702291303.issue28823@psf.upfronthosting.co.za>
2016-11-28 16:45:09serhiy.storchakalinkissue28823 messages
2016-11-28 16:45:09serhiy.storchakacreate