mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +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
|
@ -42,6 +42,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "Python.h"
|
||||
#include "ucnhash.h"
|
||||
#include "bytes_methods.h"
|
||||
#include "stringlib/eq.h"
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
#include <windows.h>
|
||||
|
@ -10886,6 +10887,12 @@ PyUnicode_RichCompare(PyObject *left, PyObject *right, int op)
|
|||
return v;
|
||||
}
|
||||
|
||||
int
|
||||
_PyUnicode_EQ(PyObject *aa, PyObject *bb)
|
||||
{
|
||||
return unicode_eq(aa, bb);
|
||||
}
|
||||
|
||||
int
|
||||
PyUnicode_Contains(PyObject *container, PyObject *element)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue