commit | 5ff12f6269c5851cfb762357d12e9ed1e3d582e9 | [log] [tgz] |
---|---|---|
author | Martin Möhrmann <moehrmann@google.com> | Sat May 25 14:23:34 2019 +0200 |
committer | Daniel Martí <mvdan@mvdan.cc> | Wed Aug 28 10:04:01 2019 +0000 |
tree | 3f9a907c471ea1afbe27c01310f55a24b9fd0b82 | |
parent | 6a73e94c10b9c2a3162722f0eb4584dc6445cae5 [diff] |
net/url: use strings.IndexByte instead of strings.Index in split function Production profiling shows ~15% of url.Parse time being spend in the overhead of calling strings.IndexByte through strings.Index instead of calling strings.IndexByte directly. name old time/op new time/op delta Split 15.5ns ± 2% 10.7ns ± 3% -30.98% (p=0.000 n=20+19) Change-Id: Ie25dd4afa93539a1335a91ab2a4a367f97bd3df0 Reviewed-on: https://go-review.googlesource.com/c/go/+/178877 Run-TryBot: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc> Reviewed-by: Brad Fitzpatrick <bradfitz@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.