aboutsummaryrefslogtreecommitdiff
path: root/src/net/http
diff options
context:
space:
mode:
authorCarlo Alberto Ferraris <cafxx@strayorange.com>2023-02-02 11:07:34 +0900
committerGopher Robot <gobot@golang.org>2023-02-03 22:28:04 +0000
commit86c4b0a6ec70b07ab49d3813a5576ed295e269e9 (patch)
tree9676397ba3eee554b2d22869cddf6f6aaa7a8620 /src/net/http
parentc3b4c27fd31b51226274a0c038e9c10a65f11657 (diff)
downloadgo-86c4b0a6ec70b07ab49d3813a5576ed295e269e9.tar.xz
context: remove one allocation in timerCtx
Embed the cancelCtx into timerCtx, instead of allocating both separately. name old time/op new time/op delta WithTimeout/concurrency=40-16 2.21µs ±11% 2.08µs ± 5% -5.76% (p=0.011 n=10+10) WithTimeout/concurrency=4000-16 1.94µs ± 6% 1.86µs ±10% ~ (p=0.099 n=9+10) WithTimeout/concurrency=400000-16 1.86µs ± 7% 1.83µs ±10% ~ (p=0.353 n=10+10) name old alloc/op new alloc/op delta WithTimeout/concurrency=40-16 2.56kB ± 0% 2.40kB ± 0% -6.25% (p=0.001 n=8+9) WithTimeout/concurrency=4000-16 2.56kB ± 0% 2.40kB ± 0% -6.25% (p=0.000 n=9+10) WithTimeout/concurrency=400000-16 2.56kB ± 0% 2.40kB ± 0% -6.26% (p=0.000 n=9+9) name old allocs/op new allocs/op delta WithTimeout/concurrency=40-16 50.0 ± 0% 40.0 ± 0% -20.00% (p=0.000 n=10+10) WithTimeout/concurrency=4000-16 50.0 ± 0% 40.0 ± 0% -20.00% (p=0.000 n=10+10) WithTimeout/concurrency=400000-16 50.0 ± 0% 40.0 ± 0% -20.00% (p=0.000 n=10+10) Change-Id: Ia0460db3b8412fbaa6f1539fd6b4fb1b873896c4 Reviewed-on: https://go-review.googlesource.com/c/go/+/463999 Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/net/http')
0 files changed, 0 insertions, 0 deletions