which is optimized for parsing without subsequent modification. The <<ref_stream_parser>> object is reused between trials, allowing temporary memory allocated by the implementation to persist and improve performance.
resource>>, which uses the standard C++ allocator, and is designed for general use including mutation of the document after it is parsed. The <<ref_stream_parser>> object is reused between trials, allowing temporary memory allocated by the implementation to persist and improve performance.
https://nlohmann.github.io/json/classnlohmann_1_1basic__json_ab330c13ba254ea41fbc1c52c5c610f45.html[`json::parse`], which uses the default `std` allocator, and is designed for general use including mutation of the document after it is parsed. This library does not provide an interface to reuse temporary storage used during parsing or serialization on subsequent operations. |===
The input files are all loaded first. Then each configuration is run for a sufficient number of trials to last at least 5 seconds. The elapsed time, number of invocations (of parse or serialize), and bytes transferred are emitted as a sample along with a calculation of throughput expressed in megabytes per second. Several samples (currently five) are generated for each configuration. All but the median two samples are discarded, with the remaining samples averaged to produce a single number which is reported as the benchmark result.