Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue: reuse adt.OpContext in Value.structValOpts
It called getStruct, which built an entirely new adt.OpContext rather than reusing the one the parent already had. The method was used only once too, so inline it to simplify. │ old │ new │ │ sec/op │ sec/op vs base │ LargeValueMarshalJSON-8 6.370m ± 1% 6.083m ± 1% -4.50% (p=0.002 n=6) │ old │ new │ │ B/op │ B/op vs base │ LargeValueMarshalJSON-8 4.178Mi ± 0% 3.445Mi ± 0% -17.56% (p=0.002 n=6) │ old │ new │ │ allocs/op │ allocs/op vs base │ LargeValueMarshalJSON-8 60.26k ± 0% 58.26k ± 0% -3.33% (p=0.002 n=6) Updates #2470. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I28bd8b820bf022e48257b445aa2e6d6e628dfe16 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201826 Reviewed-by: Roger Peppe <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information