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

optimize + benchmark muloverflow #76

Merged
merged 1 commit into from
Jun 5, 2020
Merged

optimize + benchmark muloverflow #76

merged 1 commit into from
Jun 5, 2020

Conversation

holiman
Copy link
Owner

@holiman holiman commented Jun 5, 2020

Adds a benchmarks and simplifies/improves MulOverflow a bit

name                          old time/op    new time/op    delta
MulOverflow/single/uint256-6    25.1ns ± 3%    23.0ns ± 1%  -8.22%  (p=0.016 n=5+4)
MulOverflow/single/big-6        77.0ns ±13%    75.7ns ± 4%    ~     (p=0.937 n=5+5)

name                          old alloc/op   new alloc/op   delta
MulOverflow/single/uint256-6     0.00B          0.00B         ~     (all equal)
MulOverflow/single/big-6         0.00B          0.00B         ~     (all equal)

name                          old allocs/op  new allocs/op  delta
MulOverflow/single/uint256-6      0.00           0.00         ~     (all equal)
MulOverflow/single/big-6          0.00           0.00         ~     (all equal)

@holiman holiman requested a review from chfast June 5, 2020 14:38
@holiman
Copy link
Owner Author

holiman commented Jun 5, 2020

Actually, we might need to be careful here, I'm not sure this is correct if the same backing slice is used for input.. is it?

@holiman
Copy link
Owner Author

holiman commented Jun 5, 2020

Actually, we might need to be careful here, I'm not sure this is correct if the same backing slice is used for input.. is it?

Nah that's fine, the res from umul is crisp and clean

@holiman holiman merged commit beb0847 into master Jun 5, 2020
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

Successfully merging this pull request may close these issues.

2 participants