- compare.py: make --data, --corpus, and --build-dir absolute, since the
benchmarks run in the build directory; download into a .part file and
remove an archive whose SHA-256 does not match, so that an interrupted
download is not kept
- bench_view/bench_corpus/bench_edit: report files that cannot be opened instead of
aborting; run each engine once untimed before its timed call, so that
no engine pays for the allocator cleaning up after the previous one
(with glibc, json_view after json::parse looked 1.7x slower on
citm_catalog traverse); add "simdjson DOM (fresh)" and time
"json_view (reused)" for traverse and select too
- README: explain fresh vs. reused documents and page faults on Linux
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
tests/benchmarks/json_view/ holds the comparison with other libraries,
which is not built by CMake or run by CI:
- bench_view.cpp: parse, traverse, select, and dump of twitter,
citm_catalog, canada, jeopardy, a single tweet, and a JSON-RPC request,
with json_view, yyjson, simdjson (DOM and On-Demand), Boost.JSON, and
json::parse; all engines must agree on every document before anything
is timed, and run interleaved in every round
- bench_corpus.cpp: parse, traverse, and dump of any list of files
- compare.py: builds both against include/ with the libraries of the
system (or pinned downloads), runs them, and writes the results with
what is needed to reproduce them (date, commit, CPU, OS, compiler,
flags, library versions) to results/<date>-<host>.md and .csv; only the
Python 3 standard library is used
- README.md: how to run it, what is measured, and which features the
engines have, so the numbers can be read correctly
Boost.JSON is optional (JSON_VIEW_BENCH_BOOST).
Signed-off-by: Niels Lohmann <mail@nlohmann.me>