Title: make BUILD_MAP use it's argument
Type: Stage:
Components: Interpreter Core Versions:
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: jhylton Nosy List: gvanrossum, jhylton, mwh, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2000-11-02 16:56 by mwh, last changed 2017-02-11 15:27 by serhiy.storchaka. This issue is now closed.

File name Uploaded Description Edit
None mwh, 2000-11-02 16:56 None
Messages (5)
msg34744 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2000-11-02 16:56
msg34745 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2000-11-13 19:40
I'll give this to Jeremy for consideration, since he's working on a restructuring of the function call code anyway. I'll note thta this is really low priority.
msg34746 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2000-11-02 17:00
This patch makes BUILD_MAP more like BUILD_LIST, and uses these newfound abilities to compile literal dictionaries into code more like that for lists and tuples.

No reason, really, beyong asthetics & the fact that this'll make some hacks I want to inflict on the function call mechanism easier...
msg34747 - (view) Author: Jeremy Hylton (jhylton) Date: 2001-02-01 18:14
While this change make the generated code a lot simpler, it
also has a high cost in speed and memory.  The stack for a code
object needs to be big enough to hold all the keys and values,
which can be costly.  The pybench dict creation benchmark slows
down about 15%.
msg287604 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-02-11 15:27
After all this change was implemented as a part of PEP 448 implementation (issue2292). But it was not documented and current documentation of the BUILD_MAP opcode doesn't match the implementation. See also issue26213.
Date User Action Args
2017-02-11 15:27:53serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg287604
2000-11-02 16:56:07mwhcreate