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 benchmarks of 'write_[u]int[128]' #206

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

Conversation

fintelia
Copy link
Contributor

@fintelia fintelia commented Apr 2, 2024

This adds benchmarks of other crate methods that previously weren't benchmarked.

@@ -18,7 +18,7 @@ macro_rules! bench_num {
let buf = $data;
b.iter(|| {
for _ in 0..NITER {
bb(BigEndian::$read(&buf, $bytes));
bb(BigEndian::$read(&buf, bb($bytes)));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether the $bytes input should be wrapped in black_box, but I noticed it has a huge impact on performance, so I figured I'd mention it

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm I don't think so. But I'm honestly not sure. I'd have to see a minimal reproducible example and compare codegen I think.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would defer to the status quo for now.

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