mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #28665: Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF giving a 40% speedup.
This commit is contained in:
parent
a27c064428
commit
13527123a1
2 changed files with 5 additions and 2 deletions
|
@ -2462,8 +2462,9 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
|
|||
TARGET(STORE_DEREF) {
|
||||
PyObject *v = POP();
|
||||
PyObject *cell = freevars[oparg];
|
||||
PyCell_Set(cell, v);
|
||||
Py_DECREF(v);
|
||||
PyObject *oldobj = PyCell_GET(cell);
|
||||
PyCell_SET(cell, v);
|
||||
Py_XDECREF(oldobj);
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue