Commit 83b5352
net/http: replace map lookup with switch for scheme port
Improve scheme port lookup by replacing map with switch, reducing overhead and improving performance.
Change-Id: I45c790da15e237d5f32c50d342b3713b98fd2ffa
GitHub-Last-Rev: 4c02e4c
GitHub-Pull-Request: golang#73422
Reviewed-on: https://go-review.googlesource.com/c/go/+/666356
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>1 parent 8a85a2e commit 83b5352
1 file changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2931 | 2931 | | |
2932 | 2932 | | |
2933 | 2933 | | |
2934 | | - | |
2935 | | - | |
2936 | | - | |
2937 | | - | |
2938 | | - | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
2939 | 2945 | | |
2940 | 2946 | | |
2941 | 2947 | | |
| |||
2950 | 2956 | | |
2951 | 2957 | | |
2952 | 2958 | | |
2953 | | - | |
| 2959 | + | |
2954 | 2960 | | |
2955 | 2961 | | |
2956 | 2962 | | |
| |||
0 commit comments