Skip to content

Instantly share code, notes, and snippets.

@guregu
Created April 25, 2020 10:54
Show Gist options
  • Save guregu/c27509a4bdd6f84ea93cb56743f3924f to your computer and use it in GitHub Desktop.
Save guregu/c27509a4bdd6f84ea93cb56743f3924f to your computer and use it in GitHub Desktop.
Benchmarks for guregu/null v4
# Benchmarks for v4
BenchmarkIntUnmarshalJSON-8 4329932 268 ns/op 184 B/op 2 allocs/op
BenchmarkIntStringUnmarshalJSON-8 4859449 248 ns/op 184 B/op 2 allocs/op
BenchmarkNullIntUnmarshalJSON-8 183305532 6.46 ns/op 0 B/op 0 allocs/op
BenchmarkStringUnmarshalJSON-8 4850442 241 ns/op 181 B/op 2 allocs/op
BenchmarkNullStringUnmarshalJSON-8 184386210 6.46 ns/op 0 B/op 0 allocs/op
# Benchmarks for v3
BenchmarkIntUnmarshalJSON-8 1756759 682 ns/op 392 B/op 6 allocs/op
BenchmarkIntStringUnmarshalJSON-8 3163022 380 ns/op 216 B/op 4 allocs/op
BenchmarkNullIntUnmarshalJSON-8 4112721 304 ns/op 208 B/op 3 allocs/op
BenchmarkStringUnmarshalJSON-8 3140743 375 ns/op 213 B/op 4 allocs/op
BenchmarkNullStringUnmarshalJSON-8 4092921 296 ns/op 208 B/op 3 allocs/op
# Ran on a 2013 Macbook Pro.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment