GeezerVison is showing github.com — gh-100239: specialize BINARY_OP/SUBSCR for list-slice (#132626) · python/cpython@5529213
File tree
Expand file treeCollapse file tree
Open diff view settings
Misc/NEWS.d/next/Core_and_Builtins
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: Include/cpython/pystats.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
29 | 29 | # error "this header file must not be included directly" |
30 | 30 | #endif |
31 | 31 |
|
32 | | -#define PYSTATS_MAX_UOP_ID 512 |
| 32 | +#define PYSTATS_MAX_UOP_ID 1024 |
33 | 33 |
|
34 | 34 | #define SPECIALIZATION_FAILURE_KINDS 60 |
35 | 35 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: Include/internal/pycore_list.h +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -13,10 +13,13 @@ extern "C" { |
13 | 13 | #endif |
14 | 14 |
|
15 | 15 | PyAPI_FUNC(PyObject*) _PyList_Extend(PyListObject *, PyObject *); |
| 16 | +PyAPI_FUNC(PyObject) *_PyList_SliceSubscript(PyObject*, PyObject*); |
16 | 17 | extern void _PyList_DebugMallocStats(FILE *out); |
17 | 18 | // _PyList_GetItemRef should be used only when the object is known as a list |
18 | 19 | // because it doesn't raise TypeError when the object is not a list, whereas PyList_GetItemRef does. |
19 | 20 | extern PyObject* _PyList_GetItemRef(PyListObject *, Py_ssize_t i); |
| 21 | + |
| 22 | + |
20 | 23 | #ifdef Py_GIL_DISABLED |
21 | 24 | // Returns -1 in case of races with other threads. |
22 | 25 | extern int _PyList_GetItemRefNoLock(PyListObject *, Py_ssize_t, _PyStackRef *); |
|
Collapse file
Copy file name to clipboardExpand all lines: Include/internal/pycore_opcode_metadata.h +8-1Lines changed: 8 additions & 1 deletion