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

[PR #9554/ec19bfa7 backport][3.11] Optimize WebSocketReader for 2 byte length case #9555

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Oct 28, 2024

This is a backport of PR #9554 as merged into master (ec19bfa).

Optimize WebSocketReader for 2 byte length case. The simple 2 byte length unpack can be implemented almost entirely in native code.

The profile showed a lot of time in unpack_from so this should have speed this up a bit more

Copy link

codspeed-hq bot commented Oct 28, 2024

CodSpeed Performance Report

Merging #9555 will improve performances by 13.01%

Comparing patchback/backports/3.11/ec19bfa753ff3cd1869c2e1da4f55ef561897fbb/pr-9554 (8feef87) with 3.11 (ecb6490)

Summary

⚡ 1 improvements
✅ 3 untouched benchmarks

Benchmarks breakdown

Benchmark 3.11 patchback/backports/3.11/ec19bfa753ff3cd1869c2e1da4f55ef561897fbb/pr-9554 Change
test_read_one_hundred_websocket_text_messages[pyloop] 645.8 µs 571.5 µs +13.01%

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.84%. Comparing base (ecb6490) to head (8feef87).
Report is 1 commits behind head on 3.11.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.11    #9555   +/-   ##
=======================================
  Coverage   97.84%   97.84%           
=======================================
  Files         114      114           
  Lines       35313    35313           
  Branches     4236     4236           
=======================================
  Hits        34552    34552           
  Misses        570      570           
  Partials      191      191           
Flag Coverage Δ
CI-GHA 97.72% <100.00%> (ø)
OS-Linux 97.42% <100.00%> (+<0.01%) ⬆️
OS-Windows 94.32% <25.00%> (-0.01%) ⬇️
OS-macOS 96.64% <25.00%> (-0.01%) ⬇️
Py-3.10.11 96.50% <25.00%> (-0.01%) ⬇️
Py-3.10.15 96.91% <100.00%> (ø)
Py-3.11.10 96.99% <100.00%> (+<0.01%) ⬆️
Py-3.11.9 96.59% <25.00%> (+<0.01%) ⬆️
Py-3.12.7 97.45% <100.00%> (ø)
Py-3.13.0 97.44% <100.00%> (ø)
Py-3.9.13 96.42% <25.00%> (ø)
Py-3.9.20 96.83% <100.00%> (ø)
Py-pypy7.3.16 96.45% <100.00%> (ø)
VM-macos 96.64% <25.00%> (-0.01%) ⬇️
VM-ubuntu 97.42% <100.00%> (+<0.01%) ⬆️
VM-windows 94.32% <25.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 enabled auto-merge (squash) October 28, 2024 07:54
@bdraco bdraco merged commit b535981 into 3.11 Oct 28, 2024
33 of 34 checks passed
@bdraco bdraco deleted the patchback/backports/3.11/ec19bfa753ff3cd1869c2e1da4f55ef561897fbb/pr-9554 branch October 28, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant