diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-10-20 10:18:10 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-10-20 10:18:10 (GMT) |
commit | d65f42a132de974b637ab6739a11c98449611eda (patch) | |
tree | 7576dc2925615a062d3f95258d074d22fcf3aaf7 /Python | |
parent | 24f33b5bb5dc51831522f7573b16fa66869f7b3b (diff) | |
download | cpython-d65f42a132de974b637ab6739a11c98449611eda.zip cpython-d65f42a132de974b637ab6739a11c98449611eda.tar.gz cpython-d65f42a132de974b637ab6739a11c98449611eda.tar.bz2 |
Issue #21955: Please don't try to optimize int+int
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index b50ad3c..2df94cf 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); |