-
Notifications
You must be signed in to change notification settings - Fork 646
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
Bench improvement #1342
Bench improvement #1342
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the report itself (including html) so that we can diff it whenever we have a change. Also, exclude the report from the repo stats using gitattributes.
} | ||
sum /= n as u128; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this line needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise it overfits u64
for larger sums
expected_value += (i * i) as u128; | ||
} | ||
expected_value /= n as u128; | ||
group.bench_function(BenchmarkId::new("wasm", benchmark_param_display.clone()), |b| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
benchmark id should include name of the function, e.g. "sum_n"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the group has the name
@evgenykuzyakov Is this an abandoned PR? Should we close it? |
Sorry. It still worth to complete it. I just didn't get back to address the changes. Will take a look later this week. |
@evgenykuzyakov Did you have a chance to look at it? |
@evgenykuzyakov ping? |
We can probably close it since now we have |
It's also less useful, since it just runs wasm in isolation. |
Switch bencher to criterion. Update sum_n to do work instead of running pre-compiled code