From 917f764382e63a9a61d0456b1d54a79bc679371b Mon Sep 17 00:00:00 2001 From: "David G. Andersen" Date: Mon, 2 Jul 2012 15:30:00 -0700 Subject: [PATCH] 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 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() -- 2.48.1