-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
math/big: fast path for Cmp if same #30856
Comments
Note that |
Seems reasonable, if it fires. You might try putting it in, adding some logging when it does/doesn’t fire, and then running make.bash. If it fires a non-trivial percentage of times it definitely seems worthwhile. |
Spoke to @griesemer; go ahead, for Go 1.14. |
Is anyone working on it? I'm looking to start contributing, and need an easy task for a warmup. |
Change https://golang.org/cl/178957 mentions this issue: |
math/big.Int Cmp method does not have a fast path for the case if x and y are the same. Fixes golang#30856 Change-Id: Ia9a5b5f72db9d73af1b13ed6ac39ecff87d10393 Reviewed-on: https://go-review.googlesource.com/c/go/+/178957 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
math/big.Int Cmp method does not have a fast path for the case if x and y are the same. Fixes golang#30856 Change-Id: Ia9a5b5f72db9d73af1b13ed6ac39ecff87d10393 Reviewed-on: https://go-review.googlesource.com/c/go/+/178957 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
I noticed that math/big.Int Cmp method does not have a fast path for the case if
x
andy
are the same. Wouldn't it be beneficial to have there something along the lines:Mul seems to do similar.
Same applies for big.Rat and big.Float.
The text was updated successfully, but these errors were encountered: