internal/core/compile: return Disjunction directly from or() builtin
Return a Disjunction value directly from the or() builtin, mirroring
how and() already returns a Conjunction. This avoids creating a temporary
Vertex with a DisjunctionExpr and eagerly evaluating it via CompleteArcs
with allKnown+finalize. Instead, the Disjunction is evaluated lazily
by the caller's disjunction scheduling machinery.
│ old │ new │
│ B/op │ B/op vs base │
VetInventory 3.631Gi ± ∞ ¹ 3.560Gi ± ∞ ¹ -1.95% (p=1.000 n=1)
│ old │ new │
│ allocs/op │ allocs/op vs base │
VetInventory 32.72M ± ∞ ¹ 31.70M ± ∞ ¹ -3.14% (p=1.000 n=1)
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I30060b101a4f99221b7563475c60d23a205a4e05
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1234029
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>