internal/core/adt: use grouped allocation for let Vertex and Conjunct
Use a single grouped allocation for the Vertex and its Conjunct slice
in LetReference.resolve, avoiding a separate heap allocation for the
[]Conjunct{c} slice literal. The Conjuncts slice now points into the
same allocation as the Vertex itself.
│ old │ new │
│ B/op │ B/op vs base │
VetInventory 3.504Gi ± ∞ ¹ 3.504Gi ± ∞ ¹ +0.01% (p=1.000 n=1)
│ old │ new │
│ allocs/op │ allocs/op vs base │
VetInventory 30.36M ± ∞ ¹ 30.17M ± ∞ ¹ -0.63% (p=1.000 n=1)
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I9cb81b826f2a62e3cd46072a81089e7e07745923
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1234437
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>