With complex data types, this can provide a 66% performance improvement.
Before:
$ go test -bench=.
goos: darwin
goarch: amd64
pkg: github.com/hexops/valast
BenchmarkComplexType-16 2 564812395 ns/op
PASS
ok github.com/hexops/valast 9.372s
After:
$ go test -bench=.
goos: darwin
goarch: amd64
pkg: github.com/hexops/valast
BenchmarkComplexType-16 6 189646854 ns/op
PASS
ok github.com/hexops/valast 6.379s
In practice this can result in tests running much faster, before:
With complex data types, this can provide a 66% performance improvement.
Before:
After:
In practice this can result in tests running much faster, before:
After:
Also appears to fix https://github.com/hexops/autogold/issues/16
Signed-off-by: Stephen Gutekanst stephen@hexops.com