<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 12, 2016 at 3:39 PM Nathaniel Smith <<a href="mailto:njs@pobox.com">njs@pobox.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It looks like PyUnicode_Compare already has a special case to use<br class="gmail_msg">
memcmp when both of the strings fit into latin1:<br class="gmail_msg"></blockquote><div><br></div><div>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. <br></div></div></div>