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

buffer: optimize read UInt16/24 functions with bitwise operators #57267

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gurgunday
Copy link
Contributor

@gurgunday gurgunday commented Mar 2, 2025

These are functions where it's completely safe to use bitwise operators

The maximum value here is 255, so up to 255 << 16 is fine

@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. needs-ci PRs that need a full CI run. labels Mar 2, 2025
@gurgunday gurgunday changed the title buffer: optimize read readUInt16/24 functions with bitwise operators buffer: optimize read UInt16/24 functions with bitwise operators Mar 2, 2025
Copy link

codecov bot commented Mar 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.23%. Comparing base (db4dcc0) to head (d8dfd7a).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57267      +/-   ##
==========================================
- Coverage   90.24%   90.23%   -0.01%     
==========================================
  Files         630      630              
  Lines      184921   184908      -13     
  Branches    36185    36192       +7     
==========================================
- Hits       166879   166858      -21     
+ Misses      11065    11058       -7     
- Partials     6977     6992      +15     
Files with missing lines Coverage Δ
lib/internal/buffer.js 98.75% <100.00%> (ø)

... and 41 files with indirect coverage changes

@anonrig anonrig added the needs-benchmark-ci PR that need a benchmark CI run. label Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants