Compare json-iterator performance with encoding/json
masterJson-iterator is designed for high performance. In typical benchmarks, it outperforms the standard library in both decoding and encoding speed and memory allocation.
Note: Always benchmark with your own specific workload, as performance results depend heavily on the data input.
| | ns/op | allocation bytes | allocation times |
| --------------- | ----------- | ---------------- | ---------------- |
| std decode | 35510 ns/op | 1960 B/op | 99 allocs/op |
| jsoniter decode | 5623 ns/op | 160 B/op | 3 allocs/op |
| std encode | 2213 ns/op | 712 B/op | 5 allocs/op |
| jsoniter encode | 837 ns/op | 384 B/op | 4 allocs/op |