-
Notifications
You must be signed in to change notification settings - Fork 211
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
uint: div_mod_word use intrinsic u128 division(#406) #478
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 report the results of the division benchmarks in uint
:
cd uint
cargo bench -- div
let x = (u128::from(hi) << 64) + u128::from(lo); | ||
let y = u128::from(y); | ||
((x / y) as u64, (x % y) as u64) |
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 revert this change. we're comparing two implementations here, they should produce identical results, it doesn't make sense to compare it with itself.
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.
No problem.
@frostRed to be clear, I didn't mean the PR should be closed, just the change in fuzz tests should be reverted. |
Sorry for misunderstand, I will just revert fuzz tests. |
7a77934
to
b1b72a9
Compare
Hardware:CPU 8 cores, Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, 16G Memory
|
Unfortunately, the benchmarks are inconclusive. There are some severe regressions, would need to investigate further. This will likely not go into the next release, but we can publish it later as a patch release. |
Getting good results on my laptop with rust 1.58 and
|
The fuzz test is ok, but I don't see any div_mod_word bench test because it's a private function.