STINNER Victor added the comment: Oh, I forgot this issue when I did the following commit: -- changeset: 79902:b68be1025c42 user: Victor Stinner <victor.stin...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue16286> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com