From 4b3a35b97969934bc6e6a9ecfedd01a2662ab08c Mon Sep 17 00:00:00 2001 From: "David G. Andersen" Date: Sat, 22 Sep 2012 05:53:57 +1000 Subject: [PATCH] [release-branch.go1] math/big: Remove unnecessary test from nat.go multiplication MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ««« backport c533f48701cb 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 »»» --- src/pkg/math/big/nat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/math/big/nat.go b/src/pkg/math/big/nat.go index eaa6ff0666..6d81823bb4 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() -- 2.50.0