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

U256 div measurement #608

Closed
rakita opened this issue Dec 12, 2021 · 2 comments
Closed

U256 div measurement #608

rakita opened this issue Dec 12, 2021 · 2 comments

Comments

@rakita
Copy link

rakita commented Dec 12, 2021

Currently doing some measurements on revm and how division is done in U256.
link here: bluealloy/revm#7 (comment)

In short, I am getting a performance boost from ~77-80ms to ~64-66ms
by using this part of code:

parity-common/uint/src/uint.rs

Lines 1181 to 1185 in 5fe7924

// NOTE: this is slow (__udivti3)
// let x = (u128::from(hi) << 64) + u128::from(lo);
// let d = u128::from(d);
// ((x / d) as u64, (x % d) as u64)
// TODO: look at https://gmplib.org/~tege/division-paper.pdf

@ordian
Copy link
Member

ordian commented Dec 12, 2021

See #406, #478. TL;DR is the benches result were inconsistent last time we run them. Would be good to dig into this again.

@ordian
Copy link
Member

ordian commented Feb 4, 2022

closed by #478

@ordian ordian closed this as completed Feb 4, 2022
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

No branches or pull requests

2 participants