Go to file
2024-09-19 20:54:54 +03:00
httpReuse initial commit 2024-09-19 20:54:54 +03:00
jsoniter initial commit 2024-09-19 20:54:54 +03:00
go.mod initial commit 2024-09-19 20:54:54 +03:00
go.sum initial commit 2024-09-19 20:54:54 +03:00
README.md initial commit 2024-09-19 20:54:54 +03:00

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