-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/url: use strings.IndexByte instead of strings.Index in split func…
…tion 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>
- Loading branch information
Showing
2 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters