]> Cypherpunks repositories - gostls13.git/commit
runtime: optimize 8-byte allocation pointer data writing
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 18 Sep 2024 02:38:45 +0000 (02:38 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 21 Oct 2024 14:47:08 +0000 (14:47 +0000)
commit721c04ae4ef8406f169f7e32d131a8667fc75a33
treefaa4bb89a9fcb23eb00e039f9afbf72e02b94ae6
parent56fb8350c835d1ccf0e6cdb8f753c85e2e0748a8
runtime: optimize 8-byte allocation pointer data writing

This change brings back a minor optimization lost in the Go 1.22 cycle
wherein the 8-byte pointer-ful span class spans would have the pointer
bitmap written ahead of time in bulk, because there's only one possible
pattern.

                  │   before    │               after               │
                  │   sec/op    │   sec/op     vs base              │
MallocTypeInfo8-4   25.13n ± 1%   23.59n ± 2%  -6.15% (p=0.002 n=6)

Change-Id: I135b84bb1d5b7e678b841b56430930bc73c0a038
Reviewed-on: https://go-review.googlesource.com/c/go/+/614256
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/arena.go
src/runtime/mbitmap.go
src/runtime/mcache.go
src/runtime/mcentral.go