go/src/strings
Polina Osadcha 51ac0f0f4c strings: optimize Replace by using a strings.Builder
name        old time/op    new time/op    delta
ReplaceAll     162ns ±26%     134ns ±26%  -17.44%  (p=0.014 n=10+10)

name        old alloc/op   new alloc/op   delta
ReplaceAll     32.0B ± 0%     16.0B ± 0%  -50.00%  (p=0.000 n=10+10)

name        old allocs/op  new allocs/op  delta
ReplaceAll      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.000 n=10+10)

Change-Id: Ia8377141d3adb84c7bd94e511ac8f739915aeb40
Reviewed-on: https://go-review.googlesource.com/c/go/+/245197
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
2020-08-17 04:08:35 +00:00
..
builder.go cmd/compile: add -d=checkptr to validate unsafe.Pointer rules 2019-10-17 00:40:21 +00:00
builder_test.go strings: remove a redundant and flaky part of a test 2019-10-31 20:45:40 +00:00
compare.go
compare_test.go
example_test.go
export_test.go
reader.go
reader_test.go
replace.go
replace_test.go
search.go
search_test.go
strings.go strings: optimize Replace by using a strings.Builder 2020-08-17 04:08:35 +00:00
strings_test.go strings: optimize Replace by using a strings.Builder 2020-08-17 04:08:35 +00:00