Updating documentation.

This commit is contained in:
Daniel Lemire 2018-12-14 21:50:55 -05:00
parent 0769c39e27
commit 1dfceb551e
2 changed files with 14 additions and 8 deletions

View File

@ -45,6 +45,12 @@ all: $(MAINEXECUTABLES)
competition: $(COMPARISONEXECUTABLES)
.PHONY: benchmark test
benchmark:
bash ./scripts/parser.sh
bash ./scripts/parseandstat.sh
test: jsoncheck numberparsingcheck stringparsingcheck
./numberparsingcheck
./stringparsingcheck
@ -74,8 +80,6 @@ $(GASON_INCLUDE):
$(UJSON4C_INCLUDE):
git submodule update --init --recursive
bench: benchmarks/bench.cpp $(RAPIDJSON_INCLUDE) $(HEADERS)
$(CXX) -std=c++11 -O3 -o $@ benchmarks/bench.cpp -I$(RAPIDJSON_INCLUDE) -Iinclude -march=native -lm -Wall -Wextra -Wno-narrowing
parse: benchmark/parse.cpp $(HEADERS) $(LIBFILES)

View File

@ -4,6 +4,12 @@ A C++ library to see how fast we can parse JSON with complete validation.
Goal: Speed up the parsing of JSON per se.
## Requirements
- Linux or macOS (currently)
- A recent C++ compiler (e.g., GNU GCC or LLVM CLANG)
- Bash (for benchmark scripts)
## Code example
```C
@ -63,15 +69,11 @@ make parse
Under Linux, the `parse` command gives a detailed analysis of the performance counters.
To run comparative benchmarks (with other parsers):
```
make parsingcompetition
./parsingcompetition jsonexamples/twitter.json
make benchmark
```
There is also a useful bash script to run `parsingcompetition` on several files at once: invoke `./scripts/parser.sh`.
You can also benchmark the parsing and computation of content statistics over different JSON files using `parseandstatcompetition` as well as the script `./scripts/parseandstat.sh`.
## Tools