Issue 40575: _PyDict_GetItemIdWithError() should call _PyDict_GetItem_KnownHash() - Python tracker

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.

classification
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: methane, scoder
Priority: low Keywords: easy (C), patch

Created on 2020-05-09 09:47 by scoder, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20018 merged scoder, 2020-05-09 17:54
Messages (2)
msg368506 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2020-05-09 09:47
_PyDict_GetItemIdWithError() looks up interned strings, which always have their hash value initialised. It can call _PyDict_GetItem_KnownHash() directly.
msg368604 - (view) Author: Stefan Behnel (scoder) * (Python committer) Date: 2020-05-11 04:04
New changeset 6067d4bc3ce5ff4cfa5b47ceecc84a3941bc031c by scoder in branch 'master':
bpo-40575: Avoid unnecessary overhead in _PyDict_GetItemIdWithError() (GH-20018)
https://github.com/python/cpython/commit/6067d4bc3ce5ff4cfa5b47ceecc84a3941bc031c