Open
Description
Feature or enhancement
Proposal:
We can improve performance of str.startswith
and other methods for the single-argument case by creating a fast path in the single argument parsing.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
Linked PRs
- gh-117431: Improve performance of startswith, endswith, count and find methods for strings and bytes #117432
- gh-117431: Adapt str.{start,end}swith to use the METH_FASTCALL calling convention #117466
- gh-117431: Adapt str.find and friends to use the METH_FASTCALL calling convention #117468
- gh-117431: Optimize str.startswith #117480
- gh-117431: Adapt bytes and bytearray .startswith() and .endswith() to Argument Clinic #117495
- gh-117431: Fix str.endswith docstring #117499
- gh-117431: Adapt bytes and bytearray .find() and friends to Argument Clinic #117502
- gh-117431: Amend str method signatures after PR #117468 #117590
- gh-117431: Argument Clinic: copy forced text signature when cloning #117591
- gh-117431: Improve performance of startswith and endswith #117782