diff options
| author | Martin Möhrmann <moehrmann@google.com> | 2019-05-25 14:23:34 +0200 |
|---|---|---|
| committer | Daniel Martí <mvdan@mvdan.cc> | 2019-08-28 10:04:01 +0000 |
| commit | 5ff12f6269c5851cfb762357d12e9ed1e3d582e9 (patch) | |
| tree | 3f9a907c471ea1afbe27c01310f55a24b9fd0b82 /src/encoding/xml | |
| parent | 6a73e94c10b9c2a3162722f0eb4584dc6445cae5 (diff) | |
| download | go-5ff12f6269c5851cfb762357d12e9ed1e3d582e9.tar.xz | |
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>
Diffstat (limited to 'src/encoding/xml')
0 files changed, 0 insertions, 0 deletions
