This patch is an experiment in making faster some of the most common
comparisons (str vs. str, int vs. int). I don't know if it may bring
noticeable speedups in real-world situations, but here are the synthetic
benchmark numbers (from pybench, "this" is the patched version and
"other" is vanilla py3k):
Test minimum run-time average run-time
this other diff this other
diff
-------------------------------------------------------------------------------
CompareFloats: 182ms 173ms +5.4% 182ms 176ms
+3.4%
CompareFloatsIntegers: 238ms 232ms +2.3% 242ms 236ms
+2.5%
CompareIntegers: 237ms 277ms -14.4% 237ms 280ms
-15.2%
CompareInternedStrings: 163ms 257ms -36.7% 163ms 258ms
-36.7%
CompareLongs: 137ms 160ms -14.5% 137ms 162ms
-15.6%
CompareStrings: 149ms 170ms -12.1% 154ms 170ms
-9.5%
-------------------------------------------------------------------------------
Totals: 1105ms 1268ms -12.9% 1115ms 1281ms
-13.0%