Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cue: add large Value.MarshalJSON benchmark
Adapted from a smaller benchmark that Roger provided in https://cuelang.org/issue/2470 to also include nesting of structs as well as a long string, a long list, and a long struct. As can be seen by the current results, we allocate nearly 50MiB, which is very wasteful for the current benchmark size of 2000. cpu: AMD Ryzen 7 PRO 5850U with Radeon Graphics │ old │ │ sec/op │ LargeValueMarshalJSON-8 106.2m ± 1% │ old │ │ B/op │ LargeValueMarshalJSON-8 48.24Mi ± 8% │ old │ │ allocs/op │ LargeValueMarshalJSON-8 106.2k ± 2% For #2470. Signed-off-by: Daniel Martí <mvdan@mvdan.cc> Change-Id: I437cc8fb644dd33dd0327860ca04ff66b7ab9275 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201803 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Roger Peppe <rogpeppe@gmail.com> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
- Loading branch information