]> Cypherpunks repositories - gostls13.git/commit
math/big: use recursive subdivision for significant speedup
authorMichael T. Jones <mtj@google.com>
Sun, 27 Nov 2011 19:10:59 +0000 (11:10 -0800)
committerRobert Griesemer <gri@golang.org>
Sun, 27 Nov 2011 19:10:59 +0000 (11:10 -0800)
commit4c113ffe162236d44106a1c44ab8bfb623c1c795
tree5ca89cc5cd8151a4c51ee469fac99cee22b42c17
parentd859d7deee0845433b9e9770a99c6bcdbed3c920
math/big: use recursive subdivision for significant speedup

This change adds the second aspect to the conversion code, the
use of large divisiors (powers of big base) to greatly speed up
the divsion of large numbers. Speedups of 30x are common in the
large cases. Also includes new tests and tuning code for the
key internal parameters.

R=gri
CC=golang-dev
https://golang.org/cl/5438058
src/pkg/math/big/nat.go
src/pkg/math/big/nat_test.go