Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small performance improvements to checking for chars in paths #1143

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Sep 10, 2024

What do these changes do?

Replace startswith with single char checks
startswith: 0.005655332934111357
single char check: 0.0019642498809844255

Are there changes in behavior for the user?

no

startswith: 0.005655332934111357
single char check: 0.0019642498809844255
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Sep 10, 2024
@bdraco bdraco marked this pull request as ready for review September 10, 2024 02:55
@bdraco bdraco enabled auto-merge (squash) September 10, 2024 02:55
@bdraco
Copy link
Member Author

bdraco commented Sep 10, 2024

There is also an endswith that could be optimized but its rare to hit it

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.42%. Comparing base (eaf7641) to head (edec9fa).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1143   +/-   ##
=======================================
  Coverage   95.42%   95.42%           
=======================================
  Files          30       30           
  Lines        4767     4767           
  Branches      423      423           
=======================================
  Hits         4549     4549           
  Misses        192      192           
  Partials       26       26           
Flag Coverage Δ
CI-GHA 95.38% <100.00%> (ø)
MyPy 41.14% <100.00%> (ø)
OS-Linux 99.39% <100.00%> (ø)
OS-Windows 99.49% <100.00%> (ø)
OS-macOS 99.11% <100.00%> (ø)
Py-3.10.11 99.00% <100.00%> (ø)
Py-3.10.14 99.24% <100.00%> (ø)
Py-3.11.9 99.24% <100.00%> (ø)
Py-3.12.5 99.24% <100.00%> (ø)
Py-3.13.0-rc.2 99.24% <100.00%> (ø)
Py-3.8.10 98.95% <100.00%> (ø)
Py-3.8.18 99.18% <100.00%> (ø)
Py-3.9.13 98.95% <100.00%> (ø)
Py-3.9.19 99.18% <100.00%> (ø)
Py-pypy7.3.11 99.24% <100.00%> (ø)
Py-pypy7.3.16 99.24% <100.00%> (ø)
Py-pypy7.3.17 99.27% <100.00%> (ø)
VM-macos-latest 99.11% <100.00%> (ø)
VM-ubuntu-latest 99.39% <100.00%> (ø)
VM-windows-latest 99.49% <100.00%> (ø)
pytest 99.39% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco merged commit b77cc35 into master Sep 10, 2024
45 of 47 checks passed
@bdraco bdraco deleted the path_starts_with branch September 10, 2024 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant