Skip to content

Use exported types in benchmark#26

Merged
dvdplm merged 2 commits intomasterfrom
dp/chore/address-grumbles
Aug 22, 2018
Merged

Use exported types in benchmark#26
dvdplm merged 2 commits intomasterfrom
dp/chore/address-grumbles

Conversation

@dvdplm
Copy link
Copy Markdown
Contributor

@dvdplm dvdplm commented Aug 14, 2018

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 (U256 and U512) to better emulate the speed consuming crates see.

Comment thread uint/benches/bigint.rs Outdated
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);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why not move U128 in uint crate as well? It seems to be more consistent even if it's not widely used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

U128 and it's benchmarks are obsolete since rust introduced a type u128 on stable

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why not remove everything related to it then?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yeah, let's do it!

Comment thread uint/benches/bigint.rs Outdated
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);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

U128 and it's benchmarks are obsolete since rust introduced a type u128 on stable

@dvdplm dvdplm merged commit d71aba3 into master Aug 22, 2018
@debris debris deleted the dp/chore/address-grumbles branch August 22, 2018 13:59
Comment thread uint/tests/uint_tests.rs
@@ -1196,13 +1150,11 @@ pub mod laws {
}

construct_uint!(U64, 1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants