Improve performance of startswith, endswith, count, *find, and *index methods for str, bytes and bytearray
未关闭
还没有人认领这个 Issue。
3.13
performance
type-feature
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 36k
- PR 合并指标
- PR 指标待抓取
描述
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:
https://github.com/faster-cpython/ideas/issues/671
Linked PRs
- gh-117432
- gh-117466
- gh-117468
- gh-117480
- gh-117495
- gh-117499
- gh-117502
- gh-117590
- gh-117591
- gh-117782
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先查看提案和链接的 PR(gh-117432、gh-117466、gh-117468、gh-117480、gh-117495、gh-117499、gh-117502、gh-117590、gh-117591 和 gh-117782),以了解当前实现并避免重复工作。当列出的 str、bytes 和 bytearray 方法的单参数路径显示出预期的性能提升时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- performance
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100