Go to file
2024-09-19 20:56:03 +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 updated readme 2024-09-19 20:56:03 +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      
BenchmarkNewHttpClientEachRequest-12                3360            300058 ns/op
BenchmarkReuseHttpClient-12                         6470            175472 ns/op
PASS
ok      apiSpeedImprove/httpReuse       4.010s

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