Skip to content

_PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() #84755

Description

@scoder
BPO 40575
Nosy @scoder, @methane
PRs
  • bpo-40575: Avoid unnecessary overhead in _PyDict_GetItemIdWithError() #20018
  • 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 2020-05-11.04:07:28.362>
    created_at = <Date 2020-05-09.09:47:09.547>
    labels = ['interpreter-core', 'easy', '3.9', 'performance']
    title = '_PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash()'
    updated_at = <Date 2020-05-11.04:07:28.361>
    user = 'https://github.com/scoder'

    bugs.python.org fields:

    activity = <Date 2020-05-11.04:07:28.361>
    actor = 'scoder'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-11.04:07:28.362>
    closer = 'scoder'
    components = ['Interpreter Core']
    creation = <Date 2020-05-09.09:47:09.547>
    creator = 'scoder'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40575
    keywords = ['patch', 'easy (C)']
    message_count = 2.0
    messages = ['368506', '368604']
    nosy_count = 2.0
    nosy_names = ['scoder', 'methane']
    pr_nums = ['20018']
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue40575'
    versions = ['Python 3.9']

    Activity

    1. scoder commented on May 9, 2020

      @scoder
      ContributorAuthor

      _PyDict_GetItemIdWithError() looks up interned strings, which always have their hash value initialised. It can call _PyDict_GetItem_KnownHash() directly.

    2. scoder commented on May 11, 2020

      @scoder
      ContributorAuthor

      New changeset 6067d4b by scoder in branch 'master':
      bpo-40575: Avoid unnecessary overhead in _PyDict_GetItemIdWithError() (GH-20018)
      6067d4b

    3. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.9 (EOL)end of lifeeasyinterpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions