You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cue: avoid repeated work in Value.MarshalJSON with lists
Value.appendJSON already switches on the value kind and applies defaults
so repeating that work in Value.List is a waste.
Moreover, we already have an OpContext we can reuse.
│ old │ new │
│ sec/op │ sec/op vs base │
LargeValueMarshalJSON-8 6.092m ± 1% 5.488m ± 1% -9.91% (p=0.002 n=6)
│ old │ new │
│ B/op │ B/op vs base │
LargeValueMarshalJSON-8 3.445Mi ± 0% 2.360Mi ± 0% -31.49% (p=0.002 n=6)
│ old │ new │
│ allocs/op │ allocs/op vs base │
LargeValueMarshalJSON-8 58.26k ± 0% 52.25k ± 0% -10.31% (p=0.002 n=6)
Updates #2470.
Signed-off-by: Daniel Martí <[email protected]>
Change-Id: Ie180170d277c99a996a8e38a8a9e1c0b13e28154
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202101
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
0 commit comments