Conversation
Pzixel
reviewed
Aug 15, 2018
| use uint::{U256, U512}; | ||
| // NOTE: constructing the type inside the benchmark crate is much faster so the | ||
| // numbers for `U128` are better than they'd normally be. | ||
| construct_uint!(U128, 2); |
There was a problem hiding this comment.
why not move U128 in uint crate as well? It seems to be more consistent even if it's not widely used.
Contributor
There was a problem hiding this comment.
U128 and it's benchmarks are obsolete since rust introduced a type u128 on stable
There was a problem hiding this comment.
Why not remove everything related to it then?
debris
suggested changes
Aug 15, 2018
| use uint::{U256, U512}; | ||
| // NOTE: constructing the type inside the benchmark crate is much faster so the | ||
| // numbers for `U128` are better than they'd normally be. | ||
| construct_uint!(U128, 2); |
Contributor
There was a problem hiding this comment.
U128 and it's benchmarks are obsolete since rust introduced a type u128 on stable
debris
approved these changes
Aug 20, 2018
NikVolf
approved these changes
Aug 22, 2018
debris
reviewed
Aug 22, 2018
| @@ -1196,13 +1150,11 @@ pub mod laws { | |||
| } | |||
|
|
|||
| construct_uint!(U64, 1); | |||
Contributor
There was a problem hiding this comment.
I'm pretty sure we also don't need U64 :D
sorpaas
pushed a commit
that referenced
this pull request
Jan 24, 2019
Optimize binary operations on bigints
sorpaas
pushed a commit
that referenced
this pull request
Jan 24, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As seen in #25 constructing the types inside the benchmark improves the numbers. It is probably better to have the benchmark use the exported types (
U256andU512) to better emulate the speed consuming crates see.