On 04.04.2013 11:21, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
> By the way, my initial concern was to merge unicode_compare_eq() and
> unicode_eq() functions.
>
> unicode_compare_eq() only uses memcmp(), whereas unicode_eq() checks
> if the first byte is different before calling memcmp(). So the
> question is to decide which one is faster ;-)
The second one was faster a couple of years ago. Things may have
changed since then (better compilers, CPUs, etc.). Perhaps you
could run a benchmark with increasing sizes of strings, one set
with mismatches in the last character, the other with matching
strings. |