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

Add benchmark for decoding LEB128 encoded u64 values #501

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Add benchmark for decoding LEB128 encoded u64 values #501

merged 1 commit into from
Jan 29, 2024

Conversation

danielocfb
Copy link
Collaborator

This change adds a benchmark for the decoding of LEB128 encoded u64 values. We decode a bunch of values in a single benchmark iteration, to magnify the number granularity a bit (should we ever decide to optimize a duration of 2ns per iteration doesn't give much leeway).

test util::tests::bench_u64_leb128_reading ... bench: 118 ns/iter (+/- 13)

This change adds a benchmark for the decoding of LEB128 encoded u64
values. We decode a bunch of values in a single benchmark iteration, to
magnify the number granularity a bit (should we ever decide to optimize
a duration of 2ns per iteration doesn't give much leeway).

> test util::tests::bench_u64_leb128_reading    ... bench:  118 ns/iter (+/- 13)

Signed-off-by: Daniel Müller <deso@posteo.net>
@danielocfb danielocfb merged commit 22cced0 into libbpf:main Jan 29, 2024
27 checks passed
@danielocfb danielocfb deleted the topic/leb128-bench branch January 29, 2024 19:29
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d35aa2d) 93.51% compared to head (96c952a) 93.53%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #501      +/-   ##
==========================================
+ Coverage   93.51%   93.53%   +0.02%     
==========================================
  Files          45       45              
  Lines        7951     7980      +29     
==========================================
+ Hits         7435     7464      +29     
  Misses        516      516              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants