diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-11-15 14:13:40 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-11-15 14:13:40 (GMT) |
commit | c7a8f67411f45d26910c71603fe5a567f1dd6605 (patch) | |
tree | cb724562de7cb909bf6259828a9e5cab56ef50bf /Objects/dictobject.c | |
parent | d5f599a39270b4fd791f7e0190bede9911bb0e52 (diff) | |
download | cpython-c7a8f67411f45d26910c71603fe5a567f1dd6605.zip cpython-c7a8f67411f45d26910c71603fe5a567f1dd6605.tar.gz cpython-c7a8f67411f45d26910c71603fe5a567f1dd6605.tar.bz2 |
Issue #28618: Mark dict lookup functions as hot
It's common to see these functions in the top 3 of "perf report".
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 290686b..320dff6 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -683,7 +683,7 @@ the <dummy> value. For both, when the key isn't found a DKIX_EMPTY is returned. hashpos returns where the key index should be inserted. */ -static Py_ssize_t +static Py_ssize_t _Py_HOT_FUNCTION lookdict(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject ***value_addr, Py_ssize_t *hashpos) { @@ -798,7 +798,7 @@ top: } /* Specialized version for string-only keys */ -static Py_ssize_t +static Py_ssize_t _Py_HOT_FUNCTION lookdict_unicode(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject ***value_addr, Py_ssize_t *hashpos) { @@ -873,7 +873,7 @@ lookdict_unicode(PyDictObject *mp, PyObject *key, /* Faster version of lookdict_unicode when it is known that no <dummy> keys * will be present. */ -static Py_ssize_t +static Py_ssize_t _Py_HOT_FUNCTION lookdict_unicode_nodummy(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject ***value_addr, Py_ssize_t *hashpos) @@ -941,7 +941,7 @@ lookdict_unicode_nodummy(PyDictObject *mp, PyObject *key, * Split tables only contain unicode keys and no dummy keys, * so algorithm is the same as lookdict_unicode_nodummy. */ -static Py_ssize_t +static Py_ssize_t _Py_HOT_FUNCTION lookdict_split(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject ***value_addr, Py_ssize_t *hashpos) { |