Name: json-benchmark
Owner: serde-rs
Description: nativejson-benchmark in Rust
Created: 2016-07-01 07:25:01.0
Updated: 2018-05-23 11:46:05.0
Pushed: 2018-05-20 19:03:11.0
Homepage: null
Size: 1053
Language: C++
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a partial port of nativejson-benchmark to Rust. The libraries tested are:
$ cargo run --release --bin json-benchmark
DOM STRUCT
=== serde_json ======= parse|stringify === parse|stringify ===
/canada.json 11.3ms 9.2ms 4.0ms 6.8ms
/citm_catalog.json 6.3ms 1.3ms 2.0ms 0.8ms
/twitter.json 2.5ms 0.7ms 1.1ms 0.6ms
=== json-rust ======== parse|stringify === parse|stringify ===
/canada.json 7.0ms 3.2ms
/citm_catalog.json 3.4ms 0.9ms
/twitter.json 1.4ms 0.6ms
rustc_serialize ===== parse|stringify === parse|stringify ===
/canada.json 17.8ms 41.1ms 23.4ms 55.7ms
/citm_catalog.json 14.1ms 4.1ms 17.9ms 2.9ms
/twitter.json 8.3ms 1.7ms 10.5ms 1.6ms
To update the numbers above, I run ./json-benchmark -n 256
twice on an
otherwise idle computer and take the least of the two results for each number.
For comparison, here are results from RapidJSON on the same hardware with the nativejson-benchmark modified to run 256 times instead of 10.
DOM
rapidjson-clang ===== parse|stringify ===
/canada.json 5.7ms 10.5ms
/citm_catalog.json 2.5ms 1.7ms
/twitter.json 1.8ms 1.2ms
= rapidjson-gcc ====== parse|stringify ===
/canada.json 4.7ms 8.6ms
/citm_catalog.json 1.7ms 1.0ms
/twitter.json 1.3ms 0.7ms