Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45367: Specialize BINARY_MULTIPLY #28727

Merged
merged 10 commits into from
Oct 14, 2021
Prev Previous commit
Next Next commit
typo: sum --> prod
  • Loading branch information
sweeneyde committed Oct 7, 2021
commit 903ff9c7d66186b9364071f4a43faa7afb86f6c7
8 changes: 4 additions & 4 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1955,12 +1955,12 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
DEOPT_IF(!PyLong_CheckExact(right), BINARY_MULTIPLY);
STAT_INC(BINARY_MULTIPLY, hit);
record_hit_inline(next_instr, oparg);
PyObject *sum = _PyLong_Multiply((PyLongObject *)left, (PyLongObject *)right);
SET_SECOND(sum);
PyObject *prod = _PyLong_Multiply((PyLongObject *)left, (PyLongObject *)right);
SET_SECOND(prod);
Py_DECREF(right);
Py_DECREF(left);
STACK_SHRINK(1);
if (sum == NULL) {
if (prod == NULL) {
goto error;
}
DISPATCH();
Expand All @@ -1980,7 +1980,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
Py_DECREF(right);
Py_DECREF(left);
STACK_SHRINK(1);
if (sum == NULL) {
if (prod == NULL) {
goto error;
}
DISPATCH();
Expand Down