diff --git a/doc/go1.22.html b/doc/go1.22.html index 0d358b80469..9ef372164ef 100644 --- a/doc/go1.22.html +++ b/doc/go1.22.html @@ -83,8 +83,26 @@ Do not send CLs removing the interior tags from such phrases.
- TODO: complete this section, or delete if not needed +
+ The runtime now keeps type-based garbage collection metadata nearer to each
+ heap object, improving the CPU performance (latency or throughput) of Go programs
+ by 1—3%.
+ This change also reduces the memory overhead of the majority Go programs by
+ approximately 1% by deduplicating redundant metadata.
+ Some programs may see a smaller improvement because this change adjusts the size
+ class boundaries of the memory allocator, so some objects may be moved up a size
+ class.
+
+ A consequence of this change is that some objects' addresses that were previously
+ always aligned to a 16 byte (or higher) boundary will now only be aligned to an 8
+ byte boundary.
+ Some programs that use assembly instructions that require memory addresses to be
+ more than 8-byte aligned and rely on the memory allocator's previous alignment behavior
+ may break, but we expect such programs to be rare.
+ Such programs may be built with GOEXPERIMENT=noallocheaders
to revert
+ to the old metadata layout and restore the previous alignment behavior, but package
+ owners should update their assembly code to avoid the alignment assumption, as this
+ workaround will be removed in a future release.
TODO: https://go.dev/issue/61015: change mutex profile to scale contention by number of blocked goroutines
- -- TODO: https://go.dev/cl/543255: runtime: put allocation headers back at the start the object -