internal/core/adt: do not allocate a new YieldFunc in processComprehension
We can use a method on the already allocated envComprehension,
whose pointer value is embedded into envYield.
As a bonus, the code is a bit shorter now.
│ old │ new │
│ B/op │ B/op vs base │
VetInventory 4.765Gi ± ∞ ¹ 4.752Gi ± ∞ ¹ -0.26% (p=1.000 n=1)
│ old │ new │
│ allocs/op │ allocs/op vs base │
VetInventory 53.42M ± ∞ ¹ 52.86M ± ∞ ¹ -1.05% (p=1.000 n=1)
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ied7155f0a37b03eb65470b11ac02e7e3610760bc
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1229422
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Matthew Sackman <matthew@cue.works>