mirror of https://github.com/goccy/go-json.git
Update benchmark
This commit is contained in:
parent
9b1349d40a
commit
4c7cec7071
40
README.md
40
README.md
|
@ -27,35 +27,37 @@ goarch: amd64
|
|||
### SmallStruct
|
||||
|
||||
```
|
||||
Benchmark_Decode_SmallStruct_EncodingJson-12 1000000 1660 ns/op 280 B/op 3 allocs/op
|
||||
Benchmark_Decode_SmallStruct_JsonIter-12 1000000 1284 ns/op 316 B/op 12 allocs/op
|
||||
Benchmark_Decode_SmallStruct_EasyJson-12 2000000 613 ns/op 240 B/op 2 allocs/op
|
||||
Benchmark_Decode_SmallStruct_GoJay-12 3000000 557 ns/op 256 B/op 2 allocs/op
|
||||
Benchmark_Decode_SmallStruct_GoJayUnsafe-12 3000000 507 ns/op 112 B/op 1 allocs/op
|
||||
Benchmark_Decode_SmallStruct_GoJson-12 3000000 512 ns/op 256 B/op 2 allocs/op
|
||||
Benchmark_Decode_SmallStruct_GoJsonNoEscape-12 3000000 466 ns/op 144 B/op 1 allocs/op
|
||||
Benchmark_Decode_SmallStruct_EncodingJson-12 1000000 1697 ns/op 280 B/op 3 allocs/op
|
||||
Benchmark_Decode_SmallStruct_JsonIter-12 1000000 1292 ns/op 316 B/op 12 allocs/op
|
||||
Benchmark_Decode_SmallStruct_EasyJson-12 2000000 626 ns/op 240 B/op 2 allocs/op
|
||||
Benchmark_Decode_SmallStruct_GoJay-12 3000000 559 ns/op 256 B/op 2 allocs/op
|
||||
Benchmark_Decode_SmallStruct_GoJayUnsafe-12 3000000 523 ns/op 112 B/op 1 allocs/op
|
||||
Benchmark_Decode_SmallStruct_GoJson-12 3000000 530 ns/op 256 B/op 2 allocs/op
|
||||
Benchmark_Decode_SmallStruct_GoJsonNoEscape-12 3000000 478 ns/op 144 B/op 1 allocs/op
|
||||
```
|
||||
|
||||
### MediumStruct
|
||||
|
||||
```
|
||||
Benchmark_Decode_MediumStruct_EncodingJson-12 100000 20911 ns/op 384 B/op 10 allocs/op
|
||||
Benchmark_Decode_MediumStruct_JsonIter-12 200000 11386 ns/op 2985 B/op 81 allocs/op
|
||||
Benchmark_Decode_MediumStruct_EasyJson-12 200000 6522 ns/op 232 B/op 6 allocs/op
|
||||
Benchmark_Decode_MediumStruct_GoJay-12 500000 3431 ns/op 2449 B/op 8 allocs/op
|
||||
Benchmark_Decode_MediumStruct_GoJayUnsafe-12 500000 3121 ns/op 144 B/op 7 allocs/op
|
||||
Benchmark_Decode_MediumStruct_GoJson-12 500000 2923 ns/op 2409 B/op 5 allocs/op
|
||||
Benchmark_Decode_MediumStruct_GoJsonNoEscape-12 500000 2900 ns/op 2376 B/op 4 allocs/op
|
||||
Benchmark_Decode_MediumStruct_EncodingJson-12 100000 20865 ns/op 384 B/op 10 allocs/op
|
||||
Benchmark_Decode_MediumStruct_JsonIter-12 200000 11459 ns/op 2985 B/op 81 allocs/op
|
||||
Benchmark_Decode_MediumStruct_EasyJson-12 200000 6521 ns/op 232 B/op 6 allocs/op
|
||||
Benchmark_Decode_MediumStruct_GoJay-12 500000 3503 ns/op 2449 B/op 8 allocs/op
|
||||
Benchmark_Decode_MediumStruct_GoJayUnsafe-12 500000 3226 ns/op 144 B/op 7 allocs/op
|
||||
Benchmark_Decode_MediumStruct_GoJson-12 500000 3648 ns/op 2457 B/op 8 allocs/op
|
||||
Benchmark_Decode_MediumStruct_GoJsonNoEscape-12 500000 3606 ns/op 2425 B/op 7 allocs/op
|
||||
```
|
||||
|
||||
### LargeStruct
|
||||
|
||||
```
|
||||
Benchmark_Decode_LargeStruct_EncodingJson-12 5000 288411 ns/op 312 B/op 6 allocs/op
|
||||
Benchmark_Decode_LargeStruct_JsonIter-12 10000 180028 ns/op 41737 B/op 1137 allocs/op
|
||||
Benchmark_Decode_LargeStruct_EasyJson-12 10000 105801 ns/op 160 B/op 2 allocs/op
|
||||
Benchmark_Decode_LargeStruct_GoJay-12 50000 35966 ns/op 31244 B/op 77 allocs/op
|
||||
Benchmark_Decode_LargeStruct_GoJayUnsafe-12 50000 32536 ns/op 2561 B/op 76 allocs/op
|
||||
Benchmark_Decode_LargeStruct_EncodingJson-12 5000 293675 ns/op 312 B/op 6 allocs/op
|
||||
Benchmark_Decode_LargeStruct_JsonIter-12 10000 182299 ns/op 41737 B/op 1137 allocs/op
|
||||
Benchmark_Decode_LargeStruct_EasyJson-12 10000 107157 ns/op 160 B/op 2 allocs/op
|
||||
Benchmark_Decode_LargeStruct_GoJay-12 50000 36518 ns/op 31244 B/op 77 allocs/op
|
||||
Benchmark_Decode_LargeStruct_GoJayUnsafe-12 50000 33196 ns/op 2561 B/op 76 allocs/op
|
||||
Benchmark_Decode_LargeStruct_GoJson-12 30000 56653 ns/op 31228 B/op 75 allocs/op
|
||||
Benchmark_Decode_LargeStruct_GoJsonNoEscape-12 30000 56049 ns/op 31196 B/op 74 allocs/op
|
||||
```
|
||||
|
||||
## Encode
|
||||
|
|
|
@ -4,7 +4,7 @@ go 1.12
|
|||
|
||||
require (
|
||||
github.com/francoispqt/gojay v1.2.13
|
||||
github.com/goccy/go-json v0.0.0-20200426055945-3bd7507c309f
|
||||
github.com/goccy/go-json v0.0.0-20200426062255-9b1349d40ab6
|
||||
github.com/json-iterator/go v1.1.9
|
||||
github.com/mailru/easyjson v0.7.1
|
||||
)
|
||||
|
|
|
@ -31,6 +31,8 @@ github.com/goccy/go-json v0.0.0-20200426030317-c37a3c1aac7b h1:x2rU3NmJ9v14sP8q6
|
|||
github.com/goccy/go-json v0.0.0-20200426030317-c37a3c1aac7b/go.mod h1:R/y4ycIiFvB+n4HQ2M0/BzGzFxFvgGk5wwIp4Q2JkCk=
|
||||
github.com/goccy/go-json v0.0.0-20200426055945-3bd7507c309f h1:ZIUfVwBw7xpFIPp/7neJMAycPOv1HEbLsloc2FF6/mY=
|
||||
github.com/goccy/go-json v0.0.0-20200426055945-3bd7507c309f/go.mod h1:R/y4ycIiFvB+n4HQ2M0/BzGzFxFvgGk5wwIp4Q2JkCk=
|
||||
github.com/goccy/go-json v0.0.0-20200426062255-9b1349d40ab6 h1:vJLqMycJ1FZ5RAtM5uU2beB/1cw8CqhY/LQAsffUDTU=
|
||||
github.com/goccy/go-json v0.0.0-20200426062255-9b1349d40ab6/go.mod h1:R/y4ycIiFvB+n4HQ2M0/BzGzFxFvgGk5wwIp4Q2JkCk=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
|
||||
|
|
Loading…
Reference in New Issue