From: Brian Kessler Date: Wed, 24 Oct 2018 05:59:07 +0000 (-0600) Subject: math/bits: correct BenchmarkSub64 X-Git-Tag: go1.12beta1~660 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=127c51e48c641675b363fbda62c88263267a4f44;p=gostls13.git math/bits: correct BenchmarkSub64 Previously, the benchmark was measuring Add64 instead of Sub64. Change-Id: I0cf30935c8a4728bead9868834377aae0b34f008 Reviewed-on: https://go-review.googlesource.com/c/144380 Reviewed-by: Brad Fitzpatrick Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- diff --git a/src/math/bits/bits_test.go b/src/math/bits/bits_test.go index bd6b618f35..ede7c05d41 100644 --- a/src/math/bits/bits_test.go +++ b/src/math/bits/bits_test.go @@ -918,7 +918,7 @@ func BenchmarkSub32(b *testing.B) { func BenchmarkSub64(b *testing.B) { var z, c uint64 for i := 0; i < b.N; i++ { - z, c = Add64(uint64(Input), uint64(i), c) + z, c = Sub64(uint64(Input), uint64(i), c) } Output = int(z + c) }