Benchmarks with memory allocations
Closed this issue · 4 comments
pellared commented
I think you should update your benchmark results with the memory allocations.
Zap is not only about being fast but also about having low amount of memory allocations.
yuseferi commented
Hey @pellared ,
Thank you for your attention,
as you see in the Readme of the repository the number of allocations is there. ( second column)
pkg: github.com/yuseferi/zax/v2
BenchmarkLoggingWithOnlyZap-10 344718321 35.23 ns/op
BenchmarkLoggingWithOnlyZap-10 340526908 36.74 ns/op
BenchmarkLoggingWithOnlyZap-10 337279976 36.17 ns/op
BenchmarkLoggingWithOnlyZap-10 338681052 36.18 ns/op
BenchmarkLoggingWithOnlyZap-10 339414484 35.48 ns/op
BenchmarkLoggingWithZax-10 201602071 56.58 ns/op
BenchmarkLoggingWithZax-10 213688218 57.44 ns/op
BenchmarkLoggingWithZax-10 206059045 56.66 ns/op
BenchmarkLoggingWithZax-10 211847756 58.14 ns/op
BenchmarkLoggingWithZax-10 210184916 56.69 ns/op
maybe I need to add column titles to make more sense.
Cheers,
pellared commented
The second column is the number of iterations. See https://go.googlesource.com/proposal/+/master/design/14313-benchmark-format.md
yuseferi commented
Got your point. I'm a bit busy nowadays but I will add it ;)