A few crude benchmarks for Elixir, Golang, C++, and Ruby
Processor Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
OS: Ubuntu 16.04
$ time jq '.' data/10mb.json > /dev/null
real 0m0.567s
user 0m0.551s
sys 0m0.016s
Time taken [Poison]: 1218.831ms
Time taken [Jason]: 508.461ms
time ruby app.rb
real 0m0.220s
user 0m0.203s
sys 0m0.017s
$ time jq '.' data/citylots.json > /dev/null
real 0m14.436s
user 0m13.992s
sys 0m0.420s
Time taken [Poison]: 32_640.87ms
Time taken [Jason]: 11_602.128ms
$ time ruby app.rb
real 0m4.738s
user 0m4.498s
sys 0m0.240s
Just run the build.sh
script from within the cpp/rapidjson
directory and it will output two binaries into the _builds
directory, one for sax-style parsing, the other for structure/document style parsing.
To run it the C++ programs will accept it via stdin, so don't pass it in as an argument, but instead pipe it into to it like via time _builds/rapidjson-structure < ../../data/citylots.json
or so.