Skip to content

Commit c52d9d2

Browse files
committed
gh-100239: specialize BINARY_OP/SUBSCR for list-slice
1 parent 62ff86f commit c52d9d2

File tree

13 files changed

+528
-346
lines changed

13 files changed

+528
-346
lines changed

Include/internal/pycore_list.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ extern void _PyList_DebugMallocStats(FILE *out);
1717
// _PyList_GetItemRef should be used only when the object is known as a list
1818
// because it doesn't raise TypeError when the object is not a list, whereas PyList_GetItemRef does.
1919
extern PyObject* _PyList_GetItemRef(PyListObject *, Py_ssize_t i);
20+
21+
extern PyObject *_PyList_Subscript(PyObject*, PyObject*);
22+
2023
#ifdef Py_GIL_DISABLED
2124
// Returns -1 in case of races with other threads.
2225
extern int _PyList_GetItemRefNoLock(PyListObject *, Py_ssize_t, _PyStackRef *);

Include/internal/pycore_opcode_metadata.h

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)