hexops / valast

Convert Go values to their AST
Other
308 stars 16 forks source link

Add benchmark for ocmplex types #9

Closed slimsag closed 3 years ago

slimsag commented 3 years ago

This benchmark is indicative of the performance issue reported by a user in https://github.com/sourcegraph/sourcegraph/pull/18189

$ 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

Signed-off-by: Stephen Gutekanst stephen@hexops.com