From: Robert Griesemer Date: Wed, 5 Oct 2011 20:04:43 +0000 (-0700) Subject: encoding/binary: added benchmarks X-Git-Tag: weekly.2011-10-06~18 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f7467e85e173bb029084b8d255fbb87595592d99;p=gostls13.git encoding/binary: added benchmarks binary.BenchmarkPutUvarint32 20000000 85.6 ns/op binary.BenchmarkPutUvarint64 10000000 299 ns/op R=rsc CC=golang-dev https://golang.org/cl/5148049 --- diff --git a/src/pkg/encoding/binary/varint_test.go b/src/pkg/encoding/binary/varint_test.go index 1ceb4cd4b1..ef51f09293 100644 --- a/src/pkg/encoding/binary/varint_test.go +++ b/src/pkg/encoding/binary/varint_test.go @@ -11,8 +11,8 @@ import ( ) func testConstant(t *testing.T, w uint, max int) { - var buf [MaxVarintLen64]byte - n := PutUvarint(buf[:], 1<