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

_PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() #84755

Closed
scoder opened this issue May 9, 2020 · 2 comments
Closed

_PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() #84755

scoder opened this issue May 9, 2020 · 2 comments
Labels
3.9 only security fixes easy interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage

Comments

@scoder
Copy link
Contributor

scoder commented May 9, 2020

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']

    @scoder
    Copy link
    Contributor Author

    scoder commented May 9, 2020

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

    @scoder scoder added 3.9 only security fixes performance Performance or resource usage easy interpreter-core (Objects, Python, Grammar, and Parser dirs) labels May 9, 2020
    @scoder
    Copy link
    Contributor Author

    scoder commented May 11, 2020

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

    @scoder scoder closed this as completed May 11, 2020
    @scoder scoder closed this as completed May 11, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes easy interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant