httpReuse | ||
jsoniter | ||
go.mod | ||
go.sum | ||
README.md |
goapiperf
Benchmarks comparing jsoniter VS encoding/json and HTTP reuse
Results (on my own hardware):
HTTP reuse:
goos: linux
goarch: amd64
pkg: apiSpeedImprove/httpReuse
cpu: AMD Ryzen 5 7640U w/ Radeon 760M Graphics
BenchmarkReusedHandler-12 2162 528014 ns/op
BenchmarkNewHandlerPerRequest-12 2329 497124 ns/op
PASS
ok apiSpeedImprove/httpReuse 7.193s
jsoniter:
goos: linux
goarch: amd64
pkg: apiSpeedImprove
cpu: AMD Ryzen 5 7640U w/ Radeon 760M Graphics
BenchmarkEncodingJSON-12 140383 7381 ns/op
BenchmarkJSONIter-12 974605 1217 ns/op
PASS
ok apiSpeedImprove 3.216s
Read the article here