]> granicus.if.org Git - python/commit
Issue #19424: Optimize PyUnicode_CompareWithASCIIString()
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 29 Oct 2013 22:31:50 +0000 (23:31 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 29 Oct 2013 22:31:50 +0000 (23:31 +0100)
commit602f7cf0b9afc1c7e0ab859bcfb219d20158a786
tree29523b171dac7721bee7b985a868863bcc2e6353
parentab457a2193a612610e996dd4b838437815ad8671
Issue #19424: Optimize PyUnicode_CompareWithASCIIString()

Use fast memcmp() instead of a loop using the slow PyUnicode_READ() macro.
strlen() is still necessary to check Unicode string containing null bytes.
Objects/unicodeobject.c