Skip to content

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.

3 participants