summaryrefslogtreecommitdiff
path: root/src/pkg/big/int.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-05-06 18:20:01 -0700
committerRobert Griesemer <gri@golang.org>2010-05-06 18:20:01 -0700
commit5d283246b35eb665c21915e6e08871493f6751f6 (patch)
treea661ca38628a6005c40f54ba31f1ac21c67c2b6d /src/pkg/big/int.go
parenteb8962b5d5f0dc735ff3c0306307b574c6f0d261 (diff)
downloadgolang-5d283246b35eb665c21915e6e08871493f6751f6.tar.gz
big: implemented overlap-tolerant shifts in assembly
- no need to make copies in cases of aliases - removed deprecated internal shift functions - minor unrelated simplifications This change improves pidigits -s -n10000 by almost 20%: user 0m6.156s (old) user 0m4.999s (new) (pidigits -s -n20000 goes from ~25s to ~19s) R=rsc CC=golang-dev http://codereview.appspot.com/1149041
Diffstat (limited to 'src/pkg/big/int.go')
-rwxr-xr-xsrc/pkg/big/int.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/big/int.go b/src/pkg/big/int.go
index 238292478..3e3d677e3 100755
--- a/src/pkg/big/int.go
+++ b/src/pkg/big/int.go
@@ -126,7 +126,7 @@ func (z *Int) Rem(x, y *Int) *Int {
// QuoRem implements T-division and modulus (like Go):
//
// q = x/y with the result truncated to zero
-// r = x - y*q
+// r = x - y*q
//
// (See Daan Leijen, ``Division and Modulus for Computer Scientists''.)
//
@@ -183,7 +183,7 @@ func (z *Int) Mod(x, y *Int) *Int {
// DivMod implements Euclidian division and modulus (unlike Go):
//
// q = x div y such that
-// m = x - y*q with 0 <= m < |q|
+// m = x - y*q with 0 <= m < |q|
//
// (See Raymond T. Boute, ``The Euclidian definition of the functions
// div and mod''. ACM Transactions on Programming Languages and