A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-October/114162.html below:

[Python-Dev] memcmp performance

[Python-Dev] memcmp performance [Python-Dev] memcmp performanceStefan Behnel stefan_ml at behnel.de
Fri Oct 21 20:57:45 CEST 2011
Richard Saunders, 21.10.2011 20:23:
> As long as the two strings are the same unicode "kind", you can use a
> memcmp to compare. In that case, I would almost argue some memcmp
> optimization is even more important: unicode strings are potentially 2
> to 4 times larger, so the amount of time spent in memcmp may be more
> (i.e., I am still rooting for -fno-builtin-memcmp on the compile lines).

I would argue that the pure ASCII (1 byte per character) case is even more 
important than the other cases, and it suffers from the "1 byte per 
comparison" problem you noted. That's why you got the 2x speed-up for your 
quick test.

Stefan

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4