Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 20915:23a209484f02 legacy-trunk
Backing out the fast path for interned string compares again as requested.
| author | Marc-André Lemburg <mal@egenix.com> |
|---|---|
| date | Thu, 08 Nov 2001 08:34:43 +0000 |
| parents | d88dd5c2b282 |
| children | dee0e866653e |
line wrap: on
line diff
--- a/Python/ceval.c Wed Nov 07 22:38:08 2001 +0000 +++ b/Python/ceval.c Thu Nov 08 08:34:43 2001 +0000 @@ -1778,21 +1778,6 @@ x = res ? Py_True : Py_False; Py_INCREF(x); } - else if (v == w && PyString_CheckExact(v)) { - /* Fast-path for comparing interned strings */ - switch (oparg) { - case EQ: x = Py_True; break; - case LE: x = Py_True; break; - case GE: x = Py_True; break; - case NE: x = Py_False; break; - case GT: x = Py_False; break; - case LT: x = Py_False; break; - case IS: x = Py_True; break; - case IS_NOT: x = Py_False; break; - default: goto slow_compare; - } - Py_INCREF(x); - } else { slow_compare: x = cmp_outcome(oparg, v, w);
