Skip to content
The Go programming language
Branch: master
Clone or download
Asuan and bradfitz net/url: check for lowercase before uppercase in shouldEscape
Most chars in URLs are lowercase, so check that first.

Performance change:

String-4               7.62µs ± 1%    7.27µs ± 3%  -4.61%  (p=0.008 n=5+5)
QueryEscape/#00-4      92.6ns ± 3%    90.3ns ± 1%  -2.48%  (p=0.016 n=5+5)
QueryEscape/#1-4       515ns ± 4%     510ns ± 2%    ~     (p=0.683 n=5+5)
QueryEscape/#2-4       375ns ± 1%     343ns ± 1%  -8.52%  (p=0.008 n=5+5)
QueryEscape/#3-4       758ns ± 1%     699ns ± 1%  -7.83%  (p=0.008 n=5+5)
QueryEscape/#4-4      6.06µs ± 1%    5.74µs ± 1%  -5.38%  (p=0.008 n=5+5)
PathEscape/#00-4        140ns ± 1%     135ns ± 2%  -3.85%  (p=0.008 n=5+5)
PathEscape/#1-4        511ns ± 3%     507ns ± 3%    ~     (p=0.587 n=5+5)
PathEscape/#2-4        372ns ± 1%     342ns ± 2%  -8.22%  (p=0.008 n=5+5)
PathEscape/#3-4        747ns ± 1%     685ns ± 1%  -8.30%  (p=0.008 n=5+5)
PathEscape/#4-4       5.94µs ± 1%    5.64µs ± 3%  -4.98%  (p=0.008 n=5+5)
QueryUnescape/#00-4     111ns ± 4%     110ns ± 2%    ~     (p=0.952 n=5+5)
QueryUnescape/#1-4     390ns ± 0%     391ns ± 2%    ~     (p=0.714 n=5+5)
QueryUnescape/#2-4     297ns ± 5%     295ns ± 3%    ~     (p=0.524 n=5+5)
QueryUnescape/#3-4     543ns ± 3%     556ns ± 2%  +2.39%  (p=0.032 n=5+5)
QueryUnescape/#4-4    3.23µs ± 3%    3.22µs ± 2%    ~     (p=1.000 n=5+5)
PathUnescape/#00-4      111ns ± 1%     110ns ± 3%    ~     (p=0.881 n=5+5)
PathUnescape/#1-4      389ns ± 2%     386ns ± 2%    ~     (p=0.444 n=5+5)
PathUnescape/#2-4      297ns ± 1%     295ns ± 3%    ~     (p=0.738 n=5+5)
PathUnescape/#3-4      557ns ± 3%     553ns ± 2%    ~     (p=0.810 n=5+5)
PathUnescape/#4-4     2.94µs ± 2%    2.97µs ± 2%    ~     (p=0.222 n=5+5)

Change-Id: I7e6d64cd5f8f5218cb40f52f0015168a8674aabb
Reviewed-on: https://go-review.googlesource.com/c/go/+/168883
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Latest commit c7bb453 Mar 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
api
doc cmd/go: add GOWASM environment variable Mar 23, 2019
lib/time time: read 64-bit data if available Feb 26, 2019
misc
src
test cmd/compile: follow up intrinsifying math/bits.Add64 for arm64 Mar 22, 2019
.gitattributes .gitattributes: prevent all magic line ending changes Dec 12, 2014
.gitignore
AUTHORS A+C: change email address for Elias Naur Jan 23, 2019
CONTRIBUTING.md all: restore changes from faulty merge/revert Feb 12, 2018
CONTRIBUTORS CONTRIBUTORS: second round of updates for Go 1.12 Jan 30, 2019
LICENSE
PATENTS
README.md
favicon.ico
robots.txt

README.md

The Go Programming Language

Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

Gopher image 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.

Download and Install

Binary Distributions

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.

Install From Source

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.

Contributing

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.

You can’t perform that action at this time.