Skip to content
New issue

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

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

Already on GitHub? # to your account

Avoid creating a new unquoted string if nothing changes #1293

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Oct 16, 2024

If nothing has changed in the unquote process, avoid joining the string and return the original

Copy link

codspeed-hq bot commented Oct 16, 2024

CodSpeed Performance Report

Merging #1293 will improve performances by 56.67%

Comparing avoid_malloc_nothing_to_quote_c_api_unquoter_no_change (1f0bed3) with master (4533b3c)

Summary

⚡ 2 improvements
✅ 54 untouched benchmarks

Benchmarks breakdown

Benchmark master avoid_malloc_nothing_to_quote_c_api_unquoter_no_change Change
test_unquoter_long_ascii 6.6 ms 4.2 ms +56.67%
test_unquoter_short 160.4 µs 126 µs +27.32%

Copy link

codecov bot commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.86%. Comparing base (4533b3c) to head (1f0bed3).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1293   +/-   ##
=======================================
  Coverage   95.85%   95.86%           
=======================================
  Files          27       27           
  Lines        5263     5269    +6     
  Branches      311      311           
=======================================
+ Hits         5045     5051    +6     
  Misses        192      192           
  Partials       26       26           
Flag Coverage Δ
CI-GHA 95.86% <100.00%> (+<0.01%) ⬆️
MyPy 44.14% <ø> (ø)
OS-Linux 99.30% <100.00%> (+<0.01%) ⬆️
OS-Windows 99.35% <ø> (ø)
OS-macOS 99.02% <100.00%> (+<0.01%) ⬆️
Py-3.10.11 98.99% <100.00%> (+<0.01%) ⬆️
Py-3.10.15 99.25% <100.00%> (+<0.01%) ⬆️
Py-3.11.10 99.25% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 98.99% <100.00%> (+<0.01%) ⬆️
Py-3.12.7 99.25% <100.00%> (+<0.01%) ⬆️
Py-3.13.0 99.25% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 98.95% <100.00%> (+<0.01%) ⬆️
Py-3.9.20 99.20% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.16 99.25% <ø> (ø)
Py-pypy7.3.17 99.28% <ø> (ø)
VM-macos-latest 99.02% <100.00%> (+<0.01%) ⬆️
VM-ubuntu-latest 99.30% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 99.35% <ø> (ø)
pytest 99.30% <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.

@bdraco bdraco force-pushed the avoid_malloc_nothing_to_quote_c_api_unquoter_no_change branch from 05f1619 to 6ebfcfa Compare October 16, 2024 07:15
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 16, 2024
@bdraco bdraco marked this pull request as ready for review October 16, 2024 07:36
@bdraco bdraco changed the title Avoid creating new unquoted string if nothing changes Avoid creating a new unquoted string if nothing changes Oct 16, 2024
@bdraco bdraco merged commit 2395cb8 into master Oct 16, 2024
43 of 46 checks passed
@bdraco bdraco deleted the avoid_malloc_nothing_to_quote_c_api_unquoter_no_change branch October 16, 2024 07:37
# for free to join this conversation on GitHub. Already have an account? # 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