[Python-ideas] INSANE FLOAT PERFORMANCE!!!

Elliot Gorokhovsky elliot.gorokhovsky at gmail.com
Wed Oct 12 17:43:35 EDT 2016


On Wed, Oct 12, 2016 at 3:39 PM Nathaniel Smith <njs at pobox.com> wrote:

> It looks like PyUnicode_Compare already has a special case to use
> memcmp when both of the strings fit into latin1:
>

Wow! That's great! I didn't even try reading through unicode_compare,
because I felt I might miss some subtle detail that would break everything.
But ya, that's great! Since surely latin1 is the most common use case. So
I'll just add a latin1 check in the check-loop, and then I'll have two
unsafe_unicode_compare functions. I felt bad about not being able to get
the same kind of string performance I had gotten with python2, so this is
nice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161012/3fcb8ba8/attachment-0001.html>


More information about the Python-ideas mailing list