Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/json: rely on reflect.Value.SetZero
v.SetZero() is faster than v.Set(reflect.Zero(v.Type())) and was recently added in Go 1.20. Benchmark numbers are largely unchanged since this mainly affects the unmarshaling of large numbers of JSON nulls, which our benchmarks do not heavily exercise. Change-Id: I464f60f63c9027e63a99fd5da92e7ab782018329 Reviewed-on: https://go-review.googlesource.com/c/go/+/471195 Reviewed-by: Johan Brandhorst-Satzkorn <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Than McIntosh <[email protected]> Run-TryBot: Joseph Tsai <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Joseph Tsai <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
- Loading branch information