commit | 51ac0f0f4cb432204dee3d434335fd1e61ca8446 | [log] [tgz] |
---|---|---|
author | Polina Osadcha <polliosa@google.com> | Thu Jun 18 16:17:13 2020 +0300 |
committer | Martin Möhrmann <moehrmann@google.com> | Mon Aug 17 04:08:35 2020 +0000 |
tree | 25ccafb124ef4de57b46d8156c026f8b636cbb82 | |
parent | 6f99b33c18266a8858af96163de97173bdf6f081 [diff] |
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>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.