gh-117431: Adapt str.startswith and str.endswith to Argument Clinic (… · python/cpython@444156e · GitHub
Skip to content

Commit 444156e

Browse files
gh-117431: Adapt str.startswith and str.endswith to Argument Clinic (#117466)
This change gives a significant speedup, as the METH_FASTCALL calling convention is now used.
1 parent 65524ab commit 444156e

4 files changed

Lines changed: 149 additions & 49 deletions

File tree

Lib/test/string_tests.py

Lines changed: 2 additions & 2 deletions
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Improve the performance of :meth:`str.startswith` and :meth:`str.endswith`
2+
by adapting them to the :c:macro:`METH_FASTCALL` calling convention.

Objects/clinic/unicodeobject.c.h

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

Objects/unicodeobject.c

Lines changed: 42 additions & 46 deletions

0 commit comments

Comments
 (0)