Skip to content

Improve benchmarks for getall()#1130

Merged
asvetlov merged 1 commit intomasterfrom
improve-getall-benchmarks
Apr 7, 2025
Merged

Improve benchmarks for getall()#1130
asvetlov merged 1 commit intomasterfrom
improve-getall-benchmarks

Conversation

@asvetlov
Copy link
Member

@asvetlov asvetlov commented Apr 7, 2025

Instead of filing a multidict with 100 equal keys and getting all of them by md.getall(), the PR creates a multidict with 20% of the requested keys uniformly scattered over the multidict.

@asvetlov asvetlov added the bot:chronographer:skip This PR does not need to include a change note label Apr 7, 2025
@asvetlov asvetlov marked this pull request as ready for review April 7, 2025 19:47
@codecov
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.30%. Comparing base (17f08a1) to head (a36c893).
Report is 90 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1130   +/-   ##
=======================================
  Coverage   91.30%   91.30%           
=======================================
  Files          52       52           
  Lines        6391     6393    +2     
  Branches      627      627           
=======================================
+ Hits         5835     5837    +2     
  Misses        121      121           
  Partials      435      435           
Flag Coverage Δ
CI-GHA 91.30% <100.00%> (+<0.01%) ⬆️
MyPy 83.73% <100.00%> (+0.01%) ⬆️
pytest 99.89% <ø> (-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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Apr 7, 2025

CodSpeed Performance Report

Merging #1130 will degrade performances by 13.29%

Comparing improve-getall-benchmarks (a36c893) with master (17f08a1)

Summary

⚡ 5 improvements
❌ 3 (👁 3) regressions
✅ 236 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
test_cimultidict_getall_istr_hit[c-extension-module] 32.2 µs 22.3 µs +44.38%
test_cimultidict_getall_istr_hit[pure-python-module] 58.3 µs 53.3 µs +9.39%
👁 test_cimultidict_getall_istr_miss[pure-python-module] 45.5 µs 52 µs -12.43%
test_multidict_getall_str_hit[case-insensitive-c-extension-module] 41.3 µs 25.1 µs +64.8%
test_multidict_getall_str_hit[case-insensitive-pure-python-module] 58.3 µs 53.1 µs +9.71%
test_multidict_getall_str_hit[case-sensitive-c-extension-module] 32.3 µs 23 µs +40.7%
👁 test_multidict_getall_str_miss[case-insensitive-pure-python-module] 44.1 µs 49.6 µs -11.1%
👁 test_multidict_getall_str_miss[case-sensitive-pure-python-module] 37 µs 42.7 µs -13.29%

@asvetlov asvetlov merged commit 1c5d240 into master Apr 7, 2025
46 of 47 checks passed
@asvetlov asvetlov deleted the improve-getall-benchmarks branch April 7, 2025 19:58
@asvetlov asvetlov restored the improve-getall-benchmarks branch April 7, 2025 20:38
@asvetlov asvetlov deleted the improve-getall-benchmarks branch April 7, 2025 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:skip This PR does not need to include a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant