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 improvement for constructng new URL objects #1336

Merged
merged 2 commits into from
Oct 19, 2024
Merged

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 19, 2024

Avoids the NamedTuple property accesses since we already have the values

Copy link

codspeed-hq bot commented Oct 19, 2024

CodSpeed Performance Report

Merging #1336 will improve performances by 8.14%

Comparing new_pref (d4877b9) with master (609d16d)

Summary

⚡ 2 improvements
✅ 78 untouched benchmarks

Benchmarks breakdown

Benchmark master new_pref Change
test_url_make_no_netloc 481.4 µs 446.4 µs +7.84%
test_url_make_no_netloc_relative 481.5 µs 445.2 µs +8.14%

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.98%. Comparing base (609d16d) to head (d4877b9).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1336   +/-   ##
=======================================
  Coverage   95.98%   95.98%           
=======================================
  Files          27       27           
  Lines        5430     5434    +4     
  Branches      335      335           
=======================================
+ Hits         5212     5216    +4     
  Misses        192      192           
  Partials       26       26           
Flag Coverage Δ
CI-GHA 95.98% <100.00%> (+<0.01%) ⬆️
MyPy 44.34% <100.00%> (+0.04%) ⬆️
OS-Linux 99.21% <100.00%> (+<0.01%) ⬆️
OS-Windows 99.26% <100.00%> (+<0.01%) ⬆️
OS-macOS 98.94% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 98.92% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 99.16% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 99.16% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 98.92% <100.00%> (+<0.01%) ⬆️
Py-3.12.7 99.16% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 99.16% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 98.87% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 99.12% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 99.16% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.17 99.18% <100.00%> (+<0.01%) ⬆️
VM-macos-latest 98.94% <100.00%> (+<0.01%) ⬆️
VM-ubuntu-latest 99.21% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 99.26% <100.00%> (+<0.01%) ⬆️
pytest 99.21% <100.00%> (+<0.01%) ⬆️

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.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 19, 2024
Avoids the NamedTuple property accesses since we already have the values
@bdraco bdraco marked this pull request as ready for review October 19, 2024 12:11
@bdraco bdraco enabled auto-merge (squash) October 19, 2024 12:12
@bdraco bdraco merged commit 5803ffc into master Oct 19, 2024
42 of 45 checks passed
@bdraco bdraco deleted the new_pref branch October 19, 2024 12:16
@bdraco
Copy link
Member Author

bdraco commented Oct 19, 2024

oops. typed the title constructng -> constructing

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