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
Showing
Please register or sign in to comment