]> Cypherpunks repositories - gostls13.git/commit
math/big: Implemented binary GCD algorithm
authorChristopher Swenson <cswenson@google.com>
Wed, 13 Jun 2012 16:31:20 +0000 (09:31 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 13 Jun 2012 16:31:20 +0000 (09:31 -0700)
commit38735b957c2e7d1f93021943dafc5b931b9ccab3
tree5a2649f13889bf4c5a85b749f5d251735bc5513f
parent44a3a58e451bcabad67fbd31e203a4f9f1ba2eae
  math/big: Implemented binary GCD algorithm

benchmark                    old ns/op    new ns/op    delta
BenchmarkGCD10x10                 4383         2126  -51.49%
BenchmarkGCD10x100                5612         2124  -62.15%
BenchmarkGCD10x1000               8843         2622  -70.35%
BenchmarkGCD10x10000             17025         6576  -61.37%
BenchmarkGCD10x100000           118985        48130  -59.55%
BenchmarkGCD100x100              45328        11683  -74.23%
BenchmarkGCD100x1000             50141        12678  -74.72%
BenchmarkGCD100x10000           110314        26719  -75.78%
BenchmarkGCD100x100000          630000       156041  -75.23%
BenchmarkGCD1000x1000           654809       137973  -78.93%
BenchmarkGCD1000x10000          985683       159951  -83.77%
BenchmarkGCD1000x100000        4920792       366399  -92.55%
BenchmarkGCD10000x10000       16848950      3732062  -77.85%
BenchmarkGCD10000x100000      55401500      4675876  -91.56%
BenchmarkGCD100000x100000   1126775000    258951800  -77.02%

R=gri, rsc, bradfitz, remyoudompheng, mtj
CC=golang-dev
https://golang.org/cl/6305065
src/pkg/math/big/gcd_test.go [new file with mode: 0644]
src/pkg/math/big/int.go
src/pkg/math/big/int_test.go
src/pkg/math/big/rat.go