]> Cypherpunks repositories - gostls13.git/commit
bytes: Benchmark Buffer's compactions
authorRobert Obryk <robryk@gmail.com>
Fri, 29 Mar 2013 21:17:09 +0000 (14:17 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 29 Mar 2013 21:17:09 +0000 (14:17 -0700)
commit461e7b7d409dad9406ae1e876ad7032f4356f501
tree95607fe529c5ea581f74457f40f898629e25449c
parent38e7c6b0dbd5f21ef05ce4006133a910eb84895b
bytes: Benchmark Buffer's compactions

This benchmark verifies that CL #8173043 reduces time spent
sliding the Buffer's contents.

Results without and with CL #8173043 applied:
benchmark                        old ns/op    new ns/op    delta
BenchmarkBufferFullSmallReads       755336       175054  -76.82%

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/8174043
src/pkg/bytes/buffer_test.go