From 1f74aa21d54244ea7ee4e0cabc101eb6f0ad19cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Oudompheng?= Date: Sat, 2 Mar 2013 21:11:05 +0100 Subject: [PATCH] =?UTF-8?q?runtime:=20benchmark=20for=20appending=20N=20by?= =?UTF-8?q?tes=20should=20not=20append=20N=C2=B2=20bytes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R=golang-dev, r CC=golang-dev https://golang.org/cl/7420051 --- src/pkg/runtime/append_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pkg/runtime/append_test.go b/src/pkg/runtime/append_test.go index 6eb901699b8..36390181e87 100644 --- a/src/pkg/runtime/append_test.go +++ b/src/pkg/runtime/append_test.go @@ -26,9 +26,7 @@ func benchmarkAppendBytes(b *testing.B, length int) { b.StartTimer() for i := 0; i < b.N; i++ { x = x[0:0] - for j := 0; j < N; j++ { - x = append(x, y...) - } + x = append(x, y...) } } @@ -58,9 +56,7 @@ func benchmarkAppendStr(b *testing.B, str string) { b.StartTimer() for i := 0; i < b.N; i++ { x = x[0:0] - for j := 0; j < N; j++ { - x = append(x, str...) - } + x = append(x, str...) } }