From: Victor Stinner Date: Thu, 20 Oct 2016 10:18:10 +0000 (+0200) Subject: Issue #21955: Please don't try to optimize int+int X-Git-Tag: v3.7.0a1~2189 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d65f42a132de974b637ab6739a11c98449611eda;p=thirdparty%2FPython%2Fcpython.git Issue #21955: Please don't try to optimize int+int --- diff --git a/Python/ceval.c b/Python/ceval.c index b50ad3c26397..2df94cfa8068 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1424,6 +1424,12 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) PyObject *right = POP(); PyObject *left = TOP(); PyObject *sum; + /* NOTE(haypo): Please don't try to micro-optimize int+int on + CPython using bytecode, it is simply worthless. + See http://bugs.python.org/issue21955 and + http://bugs.python.org/issue10044 for the discussion. In short, + no patch shown any impact on a realistic benchmark, only a minor + speedup on microbenchmarks. */ if (PyUnicode_CheckExact(left) && PyUnicode_CheckExact(right)) { sum = unicode_concatenate(left, right, f, next_instr);