]> Cypherpunks repositories - gostls13.git/commit
net/http: use pointers to array for copyBufPool
authorJorropo <jorropo.pgm@gmail.com>
Wed, 8 Nov 2023 15:08:26 +0000 (16:08 +0100)
committerGopher Robot <gobot@golang.org>
Tue, 21 Nov 2023 00:52:06 +0000 (00:52 +0000)
commit195c88b202695e90b2ff41b3f1a03bc19685baa6
tree74f99b29ec4951a49dff89208a36d2e13f379682
parentcc7b4b3c3685a688638363bf5be9150b04b75945
net/http: use pointers to array for copyBufPool

This is inspired by CL 539915, I'm only submitting now that
CL 456435 has been merged.

This divide the number of objects kept alive by the heap by two
and remove the slice header allocation in New and in the put back.

Change-Id: Ibcd5166bac5a37f365a533e09a28f3b79f81ad58
Reviewed-on: https://go-review.googlesource.com/c/go/+/543515
Reviewed-by: Damien Neil <dneil@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/net/http/server.go
src/net/http/transfer.go