Marc-Andre Lemburg <mal@lemburg.com>:
Added optimization proposed by Andrew Kuchling to the Unicode
matching macro.
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index bed3b7b..967334a 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -168,7 +168,8 @@
     while (0)
 
 #define Py_UNICODE_MATCH(string, offset, substring)\
-    (!memcmp((string)->str + (offset), (substring)->str,\
+    ((*((string)->str + (offset)) == *((substring)->str)) &&\
+     !memcmp((string)->str + (offset), (substring)->str,\
              (substring)->length*sizeof(Py_UNICODE)))
 
 #ifdef __cplusplus