sonic icon indicating copy to clipboard operation
sonic copied to clipboard

Questions/additions to the benchmark

Open sugawarayuuta opened this issue 1 year ago • 1 comments

I am the developer of a new JSON encoder/decoder called sonnet, a library designed for full compatibility and speed. I would like you to include mine in the benchmarks listed in your README, as I noticed that your library have similar objectives. Also, I have benchmarked Sonic against several others. However, the results did not appear to be as outstanding as stated in the README. below is an example - It uses JSON data which is from your repository (Medium Twitter JSON)

( sec/op ) Marshal Unmarshal Encode Decode
encoding/json 19.89µ 131.6µ 17.55µ 146.1µ
go-json-experiment/json 22.03µ 51.18µ N/A N/A
segmentio/encoding 10.60µ 41.91µ 7.858µ 70.66µ
json-iterator/go 25.09µ 41.55µ 30.88µ 45.86µ
goccy/go-json 9.364µ 31.68µ ⭐︎ 7.060µ 44.65µ
bytedance/sonic ⭐︎ 6.881µ 33.59µ 8.376µ 32.96µ
sugawarayuuta/sonnet 12.77µ ⭐︎ 31.01µ 9.692µ ⭐︎ 31.77µ

Machine:

goos: darwin
goarch: amd64
cpu: Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz

Benchmark code:

https://gist.github.com/sugawarayuuta/8b67fdf07f342aae1fe63e694a6121aa

Notes:

sugawarayuuta avatar May 01 '23 05:05 sugawarayuuta

It is interest. thanks your sharing. Welcome to pull request for the benchmark.

liuq19 avatar May 11 '23 07:05 liuq19