1
0
mirror of https://github.com/golang/go synced 2024-10-04 14:31:21 -06:00
go/src/pkg/bytes
Rui Ueyama 7bcbb65d78 bytes, strings: optimize Repeat
Call copy with as large buffer as possible to reduce the
number of function calls.

benchmark                 old ns/op    new ns/op    delta
BenchmarkBytesRepeat            540          162  -70.00%
BenchmarkStringsRepeat          563          177  -68.56%

LGTM=josharian
R=golang-codereviews, josharian, dave, dvyukov
CC=golang-codereviews
https://golang.org/cl/90550043
2014-06-11 19:03:59 -07:00
..
buffer_test.go bytes: Benchmark Buffer's compactions 2013-03-29 14:17:09 -07:00
buffer.go bytes: document that Buffer.Write grows the buffer 2013-03-29 14:09:31 -07:00
bytes_decl.go bytes: clarify Equal docs 2013-08-24 17:05:27 -05:00
bytes_test.go bytes, strings: optimize Repeat 2014-06-11 19:03:59 -07:00
bytes.go bytes, strings: optimize Repeat 2014-06-11 19:03:59 -07:00
bytes.s bytes: move IndexByte assembly to pkg runtime 2013-08-01 16:11:19 -07:00
compare_test.go all: add missing copyright 2013-12-17 06:52:32 -08:00
equal_test.go bytes: don't leave mprotect-ed pages after unsafe test. 2013-04-03 08:30:20 -07:00
example_test.go bytes, strings: add TrimPrefix and TrimSuffix 2013-02-01 08:41:25 -08:00
export_test.go bytes: don't grow Buffer if capacity is available 2013-03-29 12:39:19 -07:00
reader_test.go net/http, strings, bytes: fix http race, revert part of Reader behavior change 2014-04-25 06:44:51 -07:00
reader.go net/http, strings, bytes: fix http race, revert part of Reader behavior change 2014-04-25 06:44:51 -07:00