The simdjson’s new On Demand API is faster if most JSON fields are known at compile-time.
This benchmark project only checks the DOM API, a new benchmark will be added later.
AWS EC2 (AMD EPYC 7R32, gcc 9.3)
twitter.json
parse (GB/s)
stringify (GB/s)
yyjson(insitu)
1.80
1.51
yyjson
1.72
1.42
simdjson
1.52
0.61
sajson
1.16
rapidjson(insitu)
0.77
rapidjson(utf8)
0.26
0.39
cjson
0.32
0.17
jansson
0.05
0.11
iPhone (Apple A14, clang 12)
twitter.json
parse (GB/s)
stringify (GB/s)
yyjson(insitu)
3.51
2.41
yyjson
2.39
2.01
simdjson
2.19
0.80
sajson
1.74
rapidjson(insitu)
0.75
rapidjson(utf8)
0.30
0.58
cjson
0.48
0.33
jansson
0.09
0.24
More benchmark reports with interactive charts (update 2020-12-12)
Introduction
A high performance JSON library written in ANSI C.
Features
int64
,uint64
, anddouble
numbers.\u0000
characters, and non null-terminated strings.h
and onec
file.Limitations
mutable copy
for modification.Performance
Benchmark project and dataset: yyjson_benchmark
The simdjson’s new
On Demand
API is faster if most JSON fields are known at compile-time. This benchmark project only checks the DOM API, a new benchmark will be added later.AWS EC2 (AMD EPYC 7R32, gcc 9.3)
iPhone (Apple A14, clang 12)
More benchmark reports with interactive charts (update 2020-12-12)
For better performance, yyjson prefers:
Sample Code
Read JSON string
Write JSON string
Read JSON file with options
Write JSON file with options
Documentation
The latest (unreleased) documentation can be accessed in the doc directory. The pre-generated Doxygen HTML for the release version can be viewed here:
TODO
RAW
type for JSON reader and writer.License
This project is released under the MIT license.