]> Cypherpunks repositories - gostls13.git/commit
bufio: in Reader.WriteTo, try to use target's ReaderFrom
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 27 Feb 2014 18:48:36 +0000 (10:48 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 27 Feb 2014 18:48:36 +0000 (10:48 -0800)
commitb00e4770d962289ef1a542f153408d55e3307167
tree124cc18b740710ab1cb128584d1e6c41975f99db
parent08706f19b4ec98d91f08c331d43e8e8553bb30c3
bufio: in Reader.WriteTo, try to use target's ReaderFrom

This is the simple half of https://golang.org/cl/53560043/ with
a new benchmark. pongad is in the C+A files already.

benchmark                         old ns/op     new ns/op     delta
BenchmarkReaderWriteToOptimal     2054          825           -59.83%

Update #6373

LGTM=iant, gri
R=golang-codereviews, iant, gri
CC=golang-codereviews
https://golang.org/cl/69220046
src/pkg/bufio/bufio.go
src/pkg/bufio/bufio_test.go