Before anything else, delete the current `.log` file.
1. For each test/library, do the following:
- Run `UtilHeader` with the library name.
- Run the test several times in **Parse** mode.
- Recompile the test in **Access** mode.
- Run it several times again.
- Repeat for the next test.
2. Once all tests are done, run the `UtilFinish` script. It parses the `.log` file (with timestamps) and saves the Parse results into the `.db` file. Access results are saved automatically as they run.
### Code in other languages
Requirements:
- VSCode (optional)
- Python 3.11+
- Rust
- C++ (Visual Studio, or GCC — instructions below assume Visual Studio; with GCC you would need to adapt the `CMakeLists.txt` and the `.h`/`.cpp` files under `DLL` and `BenOther/`)
- The `JsonParserByLeo` repo cloned with all its dependencies (assumed already done at this point)
1.**C++**: this was built with Visual Studio 2026 (used for the `simdjson` test as an example). Open the `BenOther/C++` folder as a project, then `Ctrl+S` to let the CMake cache build. After that, compiling produces a `Test.exe` under `out/build/...`.
2.**Rust**: VSCode was used with the rust-analyzer extension; opening the project pulls dependencies automatically. Then, via CLI:
```bash
cargo build --release
```
Run the resulting executable from `target/`. This can all be done purely via CLI too — the above is just the workflow used here; if you know Rust better, feel free to do it differently. Rust knowledge here is basic — just enough to run `sonic-rs`, `serde_json`, etc. The benchmark was the only use case.
3.**Python**: simplest of all — just have Python installed. VSCode's Run button was used here. A standalone `.exe` can also be generated if preferred.
> **Note on the benchmark below:** `JsonParserByLeo` (SIMD) is not validating the input as strictly as `simdjson` does — notably,
it does not perform full UTF-8 validation during the structural scan, and it's a single flat `switch`-based pipeline with no public error-recovery API surface, unlike `simdjson::dom::parser`.
The timings below reflect the work each parser actually does, not a strict apples-to-apples "same guarantees" comparison — read it as "same ballpark, different tradeoffs," not "beats simdjson at its own game."
All access benchmarks use `test.json`, 1000 iterations, and report total time across all iterations in microseconds. Lower is better. Results are sorted fastest to slowest within each table.
- Python/C++/Rust runs: same machine (Python 3.10.9).
- C++ compiled with optimizations (`/O2` in MSVC).
- Rust compiled with maximum optimization (`target=native`, LTO, `opt-level=3`, etc.).
## Auditing the results
The complete `.db` file and the raw `.log` file used to produce it are included in the repository releases, for anyone who wants to independently audit or reproduce these numbers.