Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make BUILD_MAP use it's argument #33439

Closed
mwhudson opened this issue Nov 2, 2000 · 5 comments
Closed

make BUILD_MAP use it's argument #33439

mwhudson opened this issue Nov 2, 2000 · 5 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@mwhudson
Copy link

mwhudson commented Nov 2, 2000

BPO 402227
Nosy @mwhudson, @gvanrossum, @serhiy-storchaka
Files
  • None: None
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-02-11.15:27:53.146>
    created_at = <Date 2000-11-02.16:56:07.000>
    labels = ['interpreter-core']
    title = "make BUILD_MAP use it's argument"
    updated_at = <Date 2017-02-11.15:27:53.146>
    user = 'https://github.com/mwhudson'

    bugs.python.org fields:

    activity = <Date 2017-02-11.15:27:53.146>
    actor = 'serhiy.storchaka'
    assignee = 'jhylton'
    closed = True
    closed_date = None
    closer = None
    components = ['Interpreter Core']
    creation = <Date 2000-11-02.16:56:07.000>
    creator = 'mwh'
    dependencies = []
    files = ['2909']
    hgrepos = []
    issue_num = 402227
    keywords = ['patch']
    message_count = 5.0
    messages = ['34744', '34745', '34746', '34747', '287604']
    nosy_count = 4.0
    nosy_names = ['mwh', 'gvanrossum', 'jhylton', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'rejected'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue402227'
    versions = []

    @mwhudson
    Copy link
    Author

    mwhudson commented Nov 2, 2000

    No description provided.

    @mwhudson mwhudson closed this as completed Nov 2, 2000
    @mwhudson mwhudson added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Nov 2, 2000
    @mwhudson mwhudson closed this as completed Nov 2, 2000
    @mwhudson mwhudson added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Nov 2, 2000
    @mwhudson
    Copy link
    Author

    mwhudson commented Nov 2, 2000

    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...

    @gvanrossum
    Copy link
    Member

    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.

    @jhylton
    Copy link
    Mannequin

    jhylton mannequin commented Feb 1, 2001

    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%.

    @serhiy-storchaka
    Copy link
    Member

    After all this change was implemented as a part of PEP-448 implementation (bpo-2292). But it was not documented and current documentation of the BUILD_MAP opcode doesn't match the implementation. See also bpo-26213.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants