[issue16286] Optimize a==b and a!=b for bytes and str
STINNER Victor
report at bugs.python.org
Tue Oct 23 12:11:15 CEST 2012
STINNER Victor added the comment:
Oh, I forgot this issue when I did the following commit:
--
changeset: 79902:b68be1025c42
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Oct 23 02:48:49 2012 +0200
files: Objects/unicodeobject.c
description:
Optimize PyUnicode_RichCompare() for Py_EQ and Py_NE: always use memcmp()
--
I will benchmark the overhead of memcmp() on short strings. We may
check the first and last characters before calling memcmp() to limit
the overhead of calling a function.
I also read that GCC uses its builtin memcmp() which is slower than
the memcmp() of the GNU libc.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16286>
_______________________________________
More information about the Python-bugs-list
mailing list