summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-04-27 19:16:08 -0700
committerRobert Griesemer <gri@golang.org>2010-04-27 19:16:08 -0700
commit7363ca610df6bb07c755cda57111d7ffad374e97 (patch)
treede7fde3ac852251a9534104a0cab2a8d3e950a8a /doc
parentfc844fdfd85e79581ae4c2da73159eb3ecac090f (diff)
downloadgolang-7363ca610df6bb07c755cda57111d7ffad374e97.tar.gz
big: implemented Karatsuba multiplication
Plus: - calibration "test" - include in tests with gotest -calibrate - basic Mul benchmark - extra multiplication tests - various cleanups This change improves multiplication speed of numbers >= 30 words in length (current threshold; found empirically with calibrate): The multiplication benchmark (multiplication of a variety of long numbers) improves by ~35%, individual multiplies can be significantly faster. gotest -benchmarks=Mul big.BenchmarkMul 500 6829290 ns/op (w/ Karatsuba) big.BenchmarkMul 100 10600760 ns/op There's no impact on pidigits for -n=10000 or -n=20000 because the operands are are too small. R=rsc CC=golang-dev http://codereview.appspot.com/1004042 Committer: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions