From: David G. Andersen Date: Mon, 2 Jul 2012 22:30:00 +0000 (-0700) Subject: math/big: Remove unnecessary test from nat.go multiplication X-Git-Tag: go1.1rc2~2843 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=917f764382e63a9a61d0456b1d54a79bc679371b;p=gostls13.git math/big: Remove unnecessary test from nat.go multiplication The switch at the beginning of the function already ensures n > 1, so testing for n < 2 is redundant. R=golang-dev, gri CC=golang-dev https://golang.org/cl/6350051 --- diff --git a/src/pkg/math/big/nat.go b/src/pkg/math/big/nat.go index f132507dfd..66f14b4ee7 100644 --- a/src/pkg/math/big/nat.go +++ b/src/pkg/math/big/nat.go @@ -396,7 +396,7 @@ func (z nat) mul(x, y nat) nat { } // use basic multiplication if the numbers are small - if n < karatsubaThreshold || n < 2 { + if n < karatsubaThreshold { z = z.make(m + n) basicMul(z, x, y) return z.norm()