]> Cypherpunks repositories - gostls13.git/commit
math/big: use math/bits where appropriate
authorRobert Griesemer <gri@golang.org>
Thu, 16 Feb 2017 23:04:33 +0000 (15:04 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 24 Feb 2017 19:19:02 +0000 (19:19 +0000)
commit322fff8ac855390dc2a2876e9051a8dd526d2c6a
tree895ee4ca4a2046f046dae1ea6086ba01d5deadb8
parent7844ef427a61bd68db81912a254a3f99633a9354
math/big: use math/bits where appropriate

This change adds math/bits as a new dependency of math/big.

- use bits.LeadingZeroes instead of local implementation
  (they are identical, so there's no performance loss here)

- leave other functionality local (ntz, bitLen) since there's
  faster implementations in math/big at the moment

Change-Id: I1218aa8a1df0cc9783583b090a4bb5a8a145c4a2
Reviewed-on: https://go-review.googlesource.com/37141
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/dist/buildtool.go
src/go/build/deps_test.go
src/math/big/arith.go
src/math/big/nat.go
src/math/big/nat_test.go
src/math/big/natconv.go