Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a27c064 commit 1352712Copy full SHA for 1352712
2 files changed
Misc/NEWS
@@ -13,6 +13,8 @@ Core and Builtins
13
- Issue #19398: Extra slash no longer added to sys.path components in case of
14
empty compile-time PYTHONPATH components.
15
16
+- Issue #28665: Improve speed of the STORE_DEREF opcode by 40%.
17
+
18
- Issue #28583: PyDict_SetDefault didn't combine split table when needed.
19
Patch by Xiang Zhang.
20
Python/ceval.c
@@ -2462,8 +2462,9 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
2462
TARGET(STORE_DEREF) {
2463
PyObject *v = POP();
2464
PyObject *cell = freevars[oparg];
2465
- PyCell_Set(cell, v);
2466
- Py_DECREF(v);
+ PyObject *oldobj = PyCell_GET(cell);
+ PyCell_SET(cell, v);
2467
+ Py_XDECREF(oldobj);
2468
DISPATCH();
2469
}
2470
0 commit comments