diff options
| author | Keith Randall <khr@golang.org> | 2023-01-09 14:29:49 -0800 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2023-02-15 23:00:54 +0000 |
| commit | 0e42632301f17ae384e2cc1edb273860ed8f9fac (patch) | |
| tree | 3c202e39d50e87025836bab2c0170318f27a6a8d /src/encoding/binary | |
| parent | 87366feb125008aadc85ace6ccbfd2213b640c9c (diff) | |
| download | go-0e42632301f17ae384e2cc1edb273860ed8f9fac.tar.xz | |
cmd/compile: share compiler allocations of similar shapes
Use the same allocator for, e.g., []int32 and []int8. Anything with
similar base shapes and be coerced into a single allocator, which helps
reuse memory more often.
There is not much unsafe in the compiler currently. This adds quite a bit,
joining cmd/compiler/internal/base/mapfile_mmap.go and some unsafe.Sizeof calls.
Change-Id: I95d6d6e47c42b9f0a45f3556f4d7605735e65d99
Reviewed-on: https://go-review.googlesource.com/c/go/+/461084
Reviewed-by: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/encoding/binary')
0 files changed, 0 insertions, 0 deletions
