* docs: blog post: describe the performance work of #6020, #6028-#6031 and #6033
Theme 1 gets the iterator pairs of std::string and std::vector, a new
subsection on the fused contiguous parser after yyjson's reader, and the
FILE buffer window after gnulib's freadptr(). Theme 2 shows the reduced
SWAR test and the (c ^ 2) < 33 vector compare. Themes 4 and 6 get the
binary strings without a zero fill and the 64 KiB window of the vector
sink. Appendices H and J list the new pull requests and their checks.
The numbers of the suite, the timeline, the comparison and the compile
times are not remeasured yet.
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
* docs: blog post: remeasure on develop with #6029, #6031, #6033 and #6039
Rerun on develop 7fc8312c64 with the open pull requests #6029, #6031,
#6033 and #6039 merged, measured on November 7: the suite (median of 12
runs, now 3.3x), the timeline (358 commits, #6031 shown as a pending
step on the candidate, #6028 labeled, a tick for November), the compile
times, the stream gap, the allocator check and the comparison on the
Mac and on x86-64, including the held-out files.
The comparison now leaves out the "copy untimed" variants, as the post
describes, and the held-out chart no longer counts json::accept() as
another library. Appendix D, the Intel column of Appendix B and the
GCC 16/Clang 23 check on the Mac are still from November 3.
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
---------
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
103 lines
13 KiB
XML
103 lines
13 KiB
XML
<svg class="nj-fig nj-charts nj-charts--blog" viewBox="0 0 620 482" role="img" aria-labelledby="nj-blog-heldout nj-blog-heldout-d" xmlns="http://www.w3.org/2000/svg">
|
|
<title id="nj-blog-heldout">Validating 19 files 3.13.0 was not tuned on: json_document's time relative to the fastest other library per file</title>
|
|
<desc id="nj-blog-heldout-d">Dot plot per file, less is better; below 1.0 json_document is the fastest fully validating library. mesh: Mac 0.72, x86-64 0.44 (serde_json (Rust)); semanticscholar-corpus: Mac 0.78, x86-64 0.63 (sonic-rs (Rust)); gsoc-2018: Mac 0.59, x86-64 0.64 (Boost.J​SON); marine_ik: Mac 0.62, x86-64 0.64 (Boost.J​SON); twitter_api_compact_response: Mac 0.91, x86-64 0.66 (yyjson); twitterescaped: Mac 0.94, x86-64 0.76 (simdjson); update-center: Mac 0.88, x86-64 0.77 (simdjson); github_events: Mac 0.78, x86-64 0.78 (simdjson); twitter_api_response: Mac 0.95, x86-64 0.81 (simdjson); twitter_timeline: Mac 0.99, x86-64 0.82 (yyjson); numbers: Mac 0.72, x86-64 0.82 (Boost.J​SON); random: Mac 0.82, x86-64 0.86 (simdjson); repeat: Mac 0.65, x86-64 0.89 (simdjson); apache_builds: Mac 1.08, x86-64 0.90 (simdjson); instruments: Mac 0.92, x86-64 0.91 (simdjson); google_maps_api_compact_response: Mac 0.87, x86-64 0.92 (yyjson); mesh.pretty: Mac 0.88, x86-64 0.93 (Boost.J​SON); tree-pretty: Mac 0.96, x86-64 0.94 (simdjson); google_maps_api_response: Mac 0.91, x86-64 1.00 (simdjson).</desc>
|
|
<line class="nj-charts-grid" x1="262" y1="50" x2="262" y2="438"/>
|
|
<text class="nj-charts-tick" x="262" y="454">0.4×</text>
|
|
<line class="nj-charts-grid" x1="291.867" y1="50" x2="291.867" y2="438"/>
|
|
<text class="nj-charts-tick" x="291.867" y="454">0.5×</text>
|
|
<line class="nj-charts-grid" x1="321.733" y1="50" x2="321.733" y2="438"/>
|
|
<text class="nj-charts-tick" x="321.733" y="454">0.6×</text>
|
|
<line class="nj-charts-grid" x1="351.6" y1="50" x2="351.6" y2="438"/>
|
|
<text class="nj-charts-tick" x="351.6" y="454">0.7×</text>
|
|
<line class="nj-charts-grid" x1="381.467" y1="50" x2="381.467" y2="438"/>
|
|
<text class="nj-charts-tick" x="381.467" y="454">0.8×</text>
|
|
<line class="nj-charts-grid" x1="411.333" y1="50" x2="411.333" y2="438"/>
|
|
<text class="nj-charts-tick" x="411.333" y="454">0.9×</text>
|
|
<line class="nj-charts-grid" x1="441.2" y1="50" x2="441.2" y2="438"/>
|
|
<text class="nj-charts-tick" x="441.2" y="454">1.0×</text>
|
|
<line class="nj-charts-grid" x1="471.067" y1="50" x2="471.067" y2="438"/>
|
|
<text class="nj-charts-tick" x="471.067" y="454">1.1×</text>
|
|
<text class="nj-charts-tick" x="374" y="472">json_document’s time / the fastest other library’s, less is better</text>
|
|
<circle class="nj-charts-json-dot" cx="13" cy="14" r="5"/><text class="nj-charts-leg" x="23" y="18.5">Apple M1 Max</text>
|
|
<circle class="nj-charts-ojson-dot" cx="134.2" cy="14" r="5"/><text class="nj-charts-leg" x="144.2" y="18.5">x86-64, G​CC 16.2</text>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="48">next on x86-64</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="68" text-anchor="end">mesh</text>
|
|
<circle class="nj-charts-json-dot" cx="357.0" cy="60.5" r="4.5"><title>mesh, Apple M1 Max: 0.72× the time of Glaze</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="273.8" cy="67.5" r="4.5"><title>mesh, x86-64, G​CC 16.2: 0.44× the time of serde_json (Rust)</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="68">serde_json (Rust)</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="88" text-anchor="end">semanticscholar-corpus</text>
|
|
<circle class="nj-charts-json-dot" cx="376.0" cy="80.5" r="4.5"><title>semanticscholar-corpus, Apple M1 Max: 0.78× the time of sonic-rs (Rust)</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="331.5" cy="87.5" r="4.5"><title>semanticscholar-corpus, x86-64, G​CC 16.2: 0.63× the time of sonic-rs (Rust)</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="88">sonic-rs (Rust)</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="108" text-anchor="end">gsoc-2018</text>
|
|
<circle class="nj-charts-json-dot" cx="318.5" cy="100.5" r="4.5"><title>gsoc-2018, Apple M1 Max: 0.59× the time of sonic-rs (Rust)</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="332.3" cy="107.5" r="4.5"><title>gsoc-2018, x86-64, G​CC 16.2: 0.64× the time of Boost.J​SON</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="108">Boost.J​SON</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="128" text-anchor="end">marine_ik</text>
|
|
<circle class="nj-charts-json-dot" cx="326.2" cy="120.5" r="4.5"><title>marine_ik, Apple M1 Max: 0.62× the time of Glaze</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="333.7" cy="127.5" r="4.5"><title>marine_ik, x86-64, G​CC 16.2: 0.64× the time of Boost.J​SON</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="128">Boost.J​SON</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="148" text-anchor="end">twitter_api_compact_response</text>
|
|
<circle class="nj-charts-json-dot" cx="414.0" cy="140.5" r="4.5"><title>twitter_api_compact_response, Apple M1 Max: 0.91× the time of yyjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="340.0" cy="147.5" r="4.5"><title>twitter_api_compact_response, x86-64, G​CC 16.2: 0.66× the time of yyjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="148">yyjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="168" text-anchor="end">twitterescaped</text>
|
|
<circle class="nj-charts-json-dot" cx="423.0" cy="160.5" r="4.5"><title>twitterescaped, Apple M1 Max: 0.94× the time of yyjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="368.5" cy="167.5" r="4.5"><title>twitterescaped, x86-64, G​CC 16.2: 0.76× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="168">simdjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="188" text-anchor="end">update-center</text>
|
|
<circle class="nj-charts-json-dot" cx="404.3" cy="180.5" r="4.5"><title>update-center, Apple M1 Max: 0.88× the time of sonic-rs (Rust)</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="372.0" cy="187.5" r="4.5"><title>update-center, x86-64, G​CC 16.2: 0.77× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="188">simdjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="208" text-anchor="end">github_events</text>
|
|
<circle class="nj-charts-json-dot" cx="375.6" cy="200.5" r="4.5"><title>github_events, Apple M1 Max: 0.78× the time of simdjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="375.2" cy="207.5" r="4.5"><title>github_events, x86-64, G​CC 16.2: 0.78× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="208">simdjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="228" text-anchor="end">twitter_api_response</text>
|
|
<circle class="nj-charts-json-dot" cx="427.3" cy="220.5" r="4.5"><title>twitter_api_response, Apple M1 Max: 0.95× the time of yyjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="384.1" cy="227.5" r="4.5"><title>twitter_api_response, x86-64, G​CC 16.2: 0.81× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="228">simdjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="248" text-anchor="end">twitter_timeline</text>
|
|
<circle class="nj-charts-json-dot" cx="437.3" cy="240.5" r="4.5"><title>twitter_timeline, Apple M1 Max: 0.99× the time of yyjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="386.2" cy="247.5" r="4.5"><title>twitter_timeline, x86-64, G​CC 16.2: 0.82× the time of yyjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="248">yyjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="268" text-anchor="end">numbers</text>
|
|
<circle class="nj-charts-json-dot" cx="358.0" cy="260.5" r="4.5"><title>numbers, Apple M1 Max: 0.72× the time of Glaze</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="386.3" cy="267.5" r="4.5"><title>numbers, x86-64, G​CC 16.2: 0.82× the time of Boost.J​SON</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="268">Boost.J​SON</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="288" text-anchor="end">random</text>
|
|
<circle class="nj-charts-json-dot" cx="388.2" cy="280.5" r="4.5"><title>random, Apple M1 Max: 0.82× the time of simdjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="400.0" cy="287.5" r="4.5"><title>random, x86-64, G​CC 16.2: 0.86× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="288">simdjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="308" text-anchor="end">repeat</text>
|
|
<circle class="nj-charts-json-dot" cx="336.7" cy="300.5" r="4.5"><title>repeat, Apple M1 Max: 0.65× the time of simdjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="409.2" cy="307.5" r="4.5"><title>repeat, x86-64, G​CC 16.2: 0.89× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="308">simdjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="328" text-anchor="end">apache_builds</text>
|
|
<circle class="nj-charts-json-dot" cx="465.2" cy="320.5" r="4.5"><title>apache_builds, Apple M1 Max: 1.08× the time of simdjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="412.0" cy="327.5" r="4.5"><title>apache_builds, x86-64, G​CC 16.2: 0.90× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="328">simdjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="348" text-anchor="end">instruments</text>
|
|
<circle class="nj-charts-json-dot" cx="417.1" cy="340.5" r="4.5"><title>instruments, Apple M1 Max: 0.92× the time of yyjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="415.6" cy="347.5" r="4.5"><title>instruments, x86-64, G​CC 16.2: 0.91× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="348">simdjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="368" text-anchor="end">google_maps_api_compact_response</text>
|
|
<circle class="nj-charts-json-dot" cx="403.3" cy="360.5" r="4.5"><title>google_maps_api_compact_response, Apple M1 Max: 0.87× the time of yyjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="416.8" cy="367.5" r="4.5"><title>google_maps_api_compact_response, x86-64, G​CC 16.2: 0.92× the time of yyjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="368">yyjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="388" text-anchor="end">mesh.pretty</text>
|
|
<circle class="nj-charts-json-dot" cx="405.5" cy="380.5" r="4.5"><title>mesh.pretty, Apple M1 Max: 0.88× the time of Glaze</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="419.6" cy="387.5" r="4.5"><title>mesh.pretty, x86-64, G​CC 16.2: 0.93× the time of Boost.J​SON</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="388">Boost.J​SON</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="408" text-anchor="end">tree-pretty</text>
|
|
<circle class="nj-charts-json-dot" cx="427.9" cy="400.5" r="4.5"><title>tree-pretty, Apple M1 Max: 0.96× the time of yyjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="424.3" cy="407.5" r="4.5"><title>tree-pretty, x86-64, G​CC 16.2: 0.94× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="408">simdjson</text>
|
|
<text class="nj-charts-rowlabel nj-charts-code" x="252" y="428" text-anchor="end">google_maps_api_response</text>
|
|
<circle class="nj-charts-json-dot" cx="415.8" cy="420.5" r="4.5"><title>google_maps_api_response, Apple M1 Max: 0.91× the time of yyjson</title></circle>
|
|
<circle class="nj-charts-ojson-dot" cx="441.2" cy="427.5" r="4.5"><title>google_maps_api_response, x86-64, G​CC 16.2: 1.00× the time of simdjson</title></circle>
|
|
<text class="nj-charts-tick nj-charts-tick--l" x="500" y="428">simdjson</text>
|
|
<line class="nj-charts-ref" x1="441.2" y1="50" x2="441.2" y2="438"/>
|
|
<text class="nj-charts-tick" x="441.2" y="44">as fast as the next</text>
|
|
</svg>
|