mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
Make the unicode equality test an external function rather than in-lining it.
The real benefit of the unicode specialized function comes from bypassing the overhead of PyObject_RichCompareBool() and not from being in-lined (especially since there was almost no shared data between the caller and callee). Also, the in-lining was having a negative effect on code generation for the callee.
This commit is contained in:
parent
7fe0507d07
commit
ac2ef65c32
3 changed files with 15 additions and 5 deletions
|
@ -2261,6 +2261,10 @@ PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*);
|
|||
/* Clear all static strings. */
|
||||
PyAPI_FUNC(void) _PyUnicode_ClearStaticStrings(void);
|
||||
|
||||
/* Fast equality check when the inputs are known to be exact unicode types
|
||||
and where the hash values are equal (i.e. a very probable match) */
|
||||
PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue