From 647bb98ba632b5019b78ad5470aa01b9b57b4763 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 28 Oct 2026 13:47:37 +0100 Subject: [PATCH] docs: restructure the 3.13.0 post around themes and use cases - deeper technical detail and code in the eight themes; pull request numbers move to the appendix, timeline steps are labelled by theme - comparison with other libraries by use case, as heatmaps per platform, with validation levels and the caveats next to the results - appendix: test files, all 182 suite rows with a histogram, timeline steps, algorithmic fixes, per-file tables, behaviour changes, setup, pull requests by theme Signed-off-by: Niels Lohmann --- docs/mkdocs/docs/css/brand.css | 21 +- docs/mkdocs/docs/css/fig-charts.css | 39 + .../docs/home/blog/how_3_13_0_got_faster.md | 2691 ++++-- docs/mkdocs/docs/images/perf_blog_cliffs.svg | 14 +- .../docs/images/perf_blog_distribution.svg | 36 + .../mkdocs/docs/images/perf_blog_overview.svg | 168 +- docs/mkdocs/docs/images/perf_blog_price.svg | 99 + .../perf_blog_timeline_accept_twitter.svg | 55 +- .../images/perf_blog_timeline_dump_canada.svg | 30 +- .../perf_blog_timeline_dump_twitter.svg | 48 +- .../perf_blog_timeline_from_cbor_twitter.svg | 40 +- .../perf_blog_timeline_parse_canada.svg | 54 +- .../images/perf_blog_timeline_parse_citm.svg | 55 +- ...f_blog_timeline_parse_twitter_ifstream.svg | 26 +- .../perf_blog_timeline_to_cbor_twitter.svg | 37 +- .../docs/images/perf_blog_usecases_mac.svg | 359 + .../images/perf_blog_usecases_x86-clang.svg | 359 + .../images/perf_blog_usecases_x86-gcc.svg | 359 + .../images/perf_blog_usecases_x86-gcc13.svg | 359 + docs/mkdocs/docs/js/fig-charts.js | 69 + docs/mkdocs/includes/glossary.md | 6 + .../scripts/figures/data/perf_suite.csv | 183 + .../figures/data/perf_usecases_mac.json | 7224 +++++++++++++++++ .../figures/data/perf_usecases_x86-clang.json | 7224 +++++++++++++++++ .../figures/data/perf_usecases_x86-gcc.json | 7224 +++++++++++++++++ .../figures/data/perf_usecases_x86-gcc13.json | 7224 +++++++++++++++++ docs/mkdocs/scripts/figures/perf_blog.py | 441 +- .../scripts/figures/perf_blog_tables.py | 67 + 28 files changed, 33603 insertions(+), 908 deletions(-) create mode 100644 docs/mkdocs/docs/images/perf_blog_distribution.svg create mode 100644 docs/mkdocs/docs/images/perf_blog_price.svg create mode 100644 docs/mkdocs/docs/images/perf_blog_usecases_mac.svg create mode 100644 docs/mkdocs/docs/images/perf_blog_usecases_x86-clang.svg create mode 100644 docs/mkdocs/docs/images/perf_blog_usecases_x86-gcc.svg create mode 100644 docs/mkdocs/docs/images/perf_blog_usecases_x86-gcc13.svg create mode 100644 docs/mkdocs/scripts/figures/data/perf_suite.csv create mode 100644 docs/mkdocs/scripts/figures/data/perf_usecases_mac.json create mode 100644 docs/mkdocs/scripts/figures/data/perf_usecases_x86-clang.json create mode 100644 docs/mkdocs/scripts/figures/data/perf_usecases_x86-gcc.json create mode 100644 docs/mkdocs/scripts/figures/data/perf_usecases_x86-gcc13.json create mode 100644 docs/mkdocs/scripts/figures/perf_blog_tables.py diff --git a/docs/mkdocs/docs/css/brand.css b/docs/mkdocs/docs/css/brand.css index ea827c1e1..f788b54d6 100644 --- a/docs/mkdocs/docs/css/brand.css +++ b/docs/mkdocs/docs/css/brand.css @@ -766,7 +766,7 @@ body:has(.nj-hero) .md-content { /* figure captions: "Figure N." in bold, close to the figure, set in from the text column; figures and tables are numbered per page, each with its own counter */ -.md-content__inner { counter-reset: nj-figure nj-table; } +.md-content__inner { counter-reset: nj-figure nj-table nj-listing; } .md-typeset :is(.nj-caption, .nj-charts-caption) { max-width: none; margin: .3rem 2rem 1.5rem; @@ -787,6 +787,25 @@ body:has(.nj-hero) .md-content { .md-typeset :is(.nj-caption, .nj-charts-caption) { margin-inline: 1rem; } } +/* code captions: "Listing N." in bold, directly below the code block, in the figure caption style */ +.md-typeset .nj-code-caption { + max-width: none; + margin: -.4rem 2rem 1.5rem; + font-size: .75rem; + line-height: 1.5; + text-align: left; + color: var(--md-default-fg-color--light); +} +.md-typeset .nj-code-caption::before { + counter-increment: nj-listing; + content: "Listing " counter(nj-listing) ". "; + font-weight: 700; + color: var(--md-default-fg-color); +} +@media screen and (max-width: 44.9375em) { + .md-typeset .nj-code-caption { margin-inline: 1rem; } +} + /* table captions: "Table N." in bold, directly below the table, in the figure caption style */ .md-typeset .nj-table-caption { max-width: none; diff --git a/docs/mkdocs/docs/css/fig-charts.css b/docs/mkdocs/docs/css/fig-charts.css index 9a18bae68..a8ea40ab5 100644 --- a/docs/mkdocs/docs/css/fig-charts.css +++ b/docs/mkdocs/docs/css/fig-charts.css @@ -47,6 +47,29 @@ paint-order: stroke; stroke: var(--md-default-bg-color); stroke-width: 4px; stroke-linejoin: round; } .nj-charts .nj-charts-factor { fill: var(--nj-charts-ink2); font-size: 12px; font-weight: 600; text-anchor: middle; } .nj-charts .nj-charts-note { fill: var(--nj-charts-ink2); font-size: 12px; } +/* heatmap cells (perf_blog_usecases_*.svg): green for the fastest, gray around twice the time, red for the slowest; + adjacent steps checked for CVD separation on the light and the slate surface; the numbers are in every cell */ +.md-typeset svg.nj-charts--heat { max-width: 49rem; } +.nj-charts--heat { --nj-heat-0: #3fa557; --nj-heat-1: #8bcc95; --nj-heat-2: #ebeae6; --nj-heat-3: #f2ae9b; + --nj-heat-4: #dc5a43; --nj-heat-ink: #1b1b1b; --nj-heat-ink-strong: #1b1b1b; } +[data-md-color-scheme="slate"] .nj-charts--heat { --nj-heat-0: #3a9d50; --nj-heat-1: #2c6b3a; --nj-heat-2: #33353a; + --nj-heat-3: #8a3f2e; --nj-heat-4: #d95b3a; --nj-heat-ink: #e8e8e6; --nj-heat-ink-strong: #141414; } +.nj-charts .nj-heat-0 { fill: var(--nj-heat-0); } +.nj-charts .nj-heat-1 { fill: var(--nj-heat-1); } +.nj-charts .nj-heat-2 { fill: var(--nj-heat-2); } +.nj-charts .nj-heat-3 { fill: var(--nj-heat-3); } +.nj-charts .nj-heat-4 { fill: var(--nj-heat-4); } +.nj-charts .nj-heat-na { fill: none; stroke: var(--nj-charts-grid); stroke-width: 1; } +.nj-charts .nj-charts-cell { fill: var(--nj-heat-ink); font-size: 12px; font-variant-numeric: tabular-nums; } +.nj-charts :is(.nj-heat-0, .nj-heat-4) ~ .nj-charts-cell { fill: var(--nj-heat-ink-strong); } +.nj-charts .nj-charts-cell--small { font-size: 10.5px; } +.nj-charts .nj-heat-cell { cursor: default; outline: none; } +.nj-charts .nj-heat-cell:is(:hover, :focus-visible, .nj-heat-on) rect { stroke: var(--md-default-fg-color); stroke-width: 1.5; } +.nj-heat-tip { position: absolute; z-index: 5; max-width: 24rem; padding: .5rem .7rem; border-radius: 6px; + background: var(--md-default-bg-color); color: var(--md-default-fg-color); + box-shadow: 0 2px 10px rgba(0, 0, 0, .25); font-size: .68rem; line-height: 1.45; pointer-events: none; } +.nj-heat-tip strong { display: block; margin-bottom: .2rem; } +.nj-heat-tip[hidden] { display: none; } .nj-charts .nj-charts-grid { stroke: var(--nj-charts-grid); stroke-width: 1; } .nj-charts .nj-charts-zero, .nj-charts .nj-charts-axis { stroke: var(--nj-charts-base); stroke-width: 1.5; } @@ -145,3 +168,19 @@ /* direct line labels replace the legend */ .nj-charts .nj-charts-name-json { fill: var(--nj-charts-json-c); font-weight: 600; } .nj-charts .nj-charts-name-ojson { fill: var(--nj-charts-ojson-c); font-weight: 600; } + +/* theme badges of home/blog/how_3_13_0_got_faster.md: the number of one of the eight themes, as a digit in a blue + circle, in headings, text, tables and the timeline figures (nj-theme-dot); "U" and other marks are gray */ +.md-typeset .nj-theme { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; + min-width: 1.45em; height: 1.45em; padding: 0 .3em; border-radius: .725em; vertical-align: .08em; + background: var(--nj-blue); color: var(--md-default-bg-color); font-size: .78em; font-weight: 700; line-height: 1; + font-variant-numeric: tabular-nums; text-decoration: none; } +.md-typeset a.nj-theme:is(:hover, :focus-visible) { background: var(--nj-blue-deep); color: var(--md-default-bg-color); } +.md-typeset .nj-theme--other { background: var(--md-default-fg-color--light); } +.md-typeset h2 .nj-theme { margin-right: .35em; vertical-align: .12em; } +.md-typeset .nj-theme-list > ul { list-style: none; margin-left: 0; } +.md-typeset .nj-theme-list > ul > li { margin-left: 0; padding-left: 2em; text-indent: -2em; } +.md-typeset .nj-theme-list > ul > li > .nj-theme { margin-right: .55em; text-indent: 0; } +.nj-charts .nj-theme-dot { fill: var(--nj-blue); } +.nj-charts .nj-theme-dot--other { fill: var(--nj-charts-ink2); } +.nj-charts .nj-theme-num { fill: var(--md-default-bg-color); font-size: 11px; font-weight: 700; } diff --git a/docs/mkdocs/docs/home/blog/how_3_13_0_got_faster.md b/docs/mkdocs/docs/home/blog/how_3_13_0_got_faster.md index 7f8e0ae4d..e1ec0b6fa 100644 --- a/docs/mkdocs/docs/home/blog/how_3_13_0_got_faster.md +++ b/docs/mkdocs/docs/home/blog/how_3_13_0_got_faster.md @@ -2,119 +2,99 @@ -Since 2016, the README of this library has said this about speed: + + +Since 2016, the [README](https://github.com/nlohmann/json#readme) of this library has said this about speed: > There are certainly faster JSON libraries out there. However, if your goal is to speed up your development by adding > JSON support with a single header, then this library is the way to go. -That sentence is still true, but the gap is a lot smaller now. Swap the 3.12.0 header for the 3.13.0 one and recompile, -and the 182 benchmarks of the library's suite run on average 2.9× as fast, without a line of your code changing. -Parsing the 1.7 MB `citm_catalog.json` takes 1.75 ms instead of 7.20 ms, and `dump()` of documents made of objects -and strings is 4.7 to 6.7× as fast. The new read-only [`json_document`](../../features/json_view.md) parses and -writes faster than the other document parsers we measured on Apple silicon, including yyjson, simdjson and -sonic-rs, and ties with simdjson on x86-64. It is not the fastest everywhere; [section 8](#8-build-a-different-data-structure) -says where it loses. +That sentence is still true, but the gap is a lot smaller now. Swap the 3.12.0 header for the 3.13.0 one and +recompile, and the 182 benchmarks of the library's own suite run 2.9× as fast on an Apple M1 Max (geometric mean), +without a line of your code changing. Parsing typical documents got three to four times as fast, and writing them +three to seven times. 3.13.0 also adds [`json_document`](../../features/json_view.md), a second way to +hold a parsed document, which competes with the fastest C++ and Rust JSON libraries; [How it +compares](#how-it-compares) has the numbers, including where it loses. The price is compile time: two small +example programs take 20 to 63 % longer to compile. A precompiled header or a C++20 module wins back most or all of +that in debug builds, and a quarter to four fifths of it in optimized builds ([The price](#the-price)). -This post is about *how*. None of the techniques is new: almost every one of them is borrowed from simdjson, yyjson, -fast_float, Żmij, serde_json, SQLite, Boost.JSON or a textbook, and we name the source at each step. What we think is +This post is about *how*. None of the techniques is new: almost every one of them is borrowed from +[simdjson](https://github.com/simdjson/simdjson), [yyjson](https://github.com/ibireme/yyjson), +[fast_float](https://github.com/fastfloat/fast_float), [Żmij](https://github.com/vitaut/zmij), +[serde_json](https://github.com/serde-rs/json), [SQLite](https://sqlite.org), +[Boost.JSON](https://github.com/boostorg/json) or a textbook, and we name the source at each step. What we think is worth writing about is the combination, and the conditions it had to work under: a C++11 header-only library with a -value type that is a template over its string, number, object and allocator types, input from strings, streams, -`FILE*`, iterator pairs, wide strings and user-defined adapters, output that had to stay byte-for-byte the same (with one deliberate exception, see theme 3), and error messages that had to keep pointing at the same byte. +value type that is a template over its string, number, object and allocator types; input from strings, streams, +`FILE*`, iterator pairs, wide strings and user-defined adapters; output that had to stay the same byte for byte; and +error messages that had to keep pointing at the same byte. The few deliberate changes of output are listed in +[Appendix F](#f-behavior-changes). -We tried to be careful about what we claim. Every number below comes either from a benchmark we ran for this post -(described in [How we measured](#how-we-measured)) or from the description of the pull request that made the change, -which we link. The PR numbers were measured at the time against the state before the PR, often on more than one -machine, and say so. +Every number comes from a benchmark we ran for this post or from the pull request that made the change. The +[appendix](#appendix) describes the test files and the setup, has the full tables behind every chart, and lists the +pull requests behind each theme. + +Fast paths are where the bugs are: they read 8 or 16 bytes at a time, skip work the slow path did, and are taken only +for some inputs. So each of them was checked against the slow path it replaces, down to the same error message at the +same byte, on millions of generated and fuzzed inputs. [Appendix J](#j-validation) lists the checks. ## The short version -Most rows below use three files from Milo Yip's [nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark) -that JSON libraries have been measured with for a decade, plus one large file. They stress different parts of a -parser: - -| file | size | what it is | what makes it hard | -| --- | --: | --- | --- | -| `twitter.json` | 632 KB | 100 tweets from Twitter's search API, with their users | strings: 58 % of the bytes are keys and strings, 15 % of the bytes are non-ASCII (almost all of it Japanese text), and 13,345 keys | -| `citm_catalog.json` | 1.7 MB | a concert hall's catalog of events, performances and seat categories, in French | structure: 21,388 small objects and arrays, 14,392 integers, keys that average 8 bytes, and 71 % whitespace from indentation | -| `canada.json` | 2.3 MB | the outline of Canada in GeoJSON | numbers: 111,080 floating-point coordinates, most with 16 or 17 significant digits, in 56,045 arrays, and almost no whitespace | -| `jeopardy.json` | 56 MB | 216,930 Jeopardy! questions as one array of objects | size: 1.5 million short strings in objects of 7 members; far larger than the CPU caches | - -

The test files. The counts are of the parsed values; the share of whitespace, string and non-ASCII bytes is of the file as distributed.

- -Apple M1 Max, Apple clang 21, `-O3 -flto`, the compiler's default standard (C++14); the same benchmark source for both -headers. The parse rows do not include destroying the result (the suite pauses the timer for that): - -| workload | 3.12.0 | 3.13.0 | speedup | -| --- | --: | --: | --: | -| `json::parse()` of `twitter.json` | 3.16 ms | 1.05 ms | 3.0× | -| `json::parse()` of `citm_catalog.json` | 7.20 ms | 1.75 ms | 4.1× | -| `json::parse()` of `canada.json` | 15.1 ms | 4.35 ms | 3.5× | -| `json::parse()` of `canada.json`, indented by 4 spaces | 33.8 ms | 5.02 ms | 6.7× | -| `ordered_json::parse()` of `citm_catalog.json` | 10.8 ms | 1.64 ms | 6.6× | -| `json::parse()` of `twitter.json` from an `std::ifstream` | 3.34 ms | 1.35 ms | 2.5× | -| `json::parse()` of `citm_catalog.json` from a `FILE*` | 34.6 ms | 7.26 ms | 4.8× | -| `json::accept()` of `citm_catalog.json` | 6.36 ms | 0.91 ms | 7.0× | -| `dump()` of `twitter.json` | 1.39 ms | 0.208 ms | 6.7× | -| `dump()` of `canada.json` | 6.63 ms | 2.25 ms | 2.9× | -| `dump(4)` of `citm_catalog.json` | 1.93 ms | 0.416 ms | 4.6× | -| `to_cbor()` of `twitter.json` | 0.638 ms | 0.142 ms | 4.5× | -| `from_cbor()` of `twitter.json` from memory | 3.00 ms | 0.965 ms | 3.1× | -| `from_cbor()` of `twitter.json` from a `FILE*` | 9.71 ms | 1.54 ms | 6.3× | -| `diff()` of `canada.json` with every eighth scalar changed | 38.3 ms | 3.67 ms | 10.4× | -| iterating over every value of `canada.json` | 0.861 ms | 0.320 ms | 2.7× | -| copying `citm_catalog.json` and destroying the copy | 1.61 ms | 1.45 ms | 1.11× | -| `==` of `citm_catalog.json` and a copy | 0.264 ms | 0.254 ms | 1.04× | - -

Time per call with 3.12.0 and 3.13.0, Google Benchmark suite, median of 8 runs; the speedup is the old time divided by the new one.

+The test files are the three of Milo Yip's [nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark) +that JSON libraries have been measured with for a decade, `twitter.json` (strings, much of it Japanese), `citm_catalog.json` (many small objects, indented) and +`canada.json` (floating-point numbers), plus the 56 MB `jeopardy.json`. [Appendix A](#a-test-files) says what makes +each of them hard.
--8<-- "images/perf_blog_overview.svg"
-

The speedups of the table above as bars. More is better; the vertical line at 1× is 3.12.0.

+

Speedup of 3.13.0 over 3.12.0 for a selection of workloads: the old time divided by the new one, Google Benchmark suite on an Apple M1 Max, median of 8 runs. More is better; the vertical line at 1× is 3.12.0. The times are in [Appendix B](#b-3120-against-3130).

-The average over all 182 benchmarks of the suite is 2.93× (geometric mean); none got slower except the time of a -copy alone, 0.94 to 1.03× (copying and destroying together is 1.09 to 1.29× as fast). We have not measured where the -copy's few percent go; one known cost is the counter that bounds its recursion, about ten nanoseconds per copied -container in [#5389][5389]'s measurement. Copying and comparing gained the least. +The rows above are chosen to show the range. All 182 benchmarks of the suite: -One thing to keep in mind about `citm_catalog.json`: as distributed, it is indented, and 71 % of its 1.7 MB are -whitespace. Several changes below help exactly that. A minified copy of it parses 1.9× as fast as with 3.12.0 in our -timeline, against 3.3× for the file as distributed. +
+--8<-- "images/perf_blog_distribution.svg" +
+ +

How many of the suite's 182 benchmarks got how much faster. The two below 1× are copying a document without destroying it. Every row is in [Appendix B](#b-3120-against-3130).

+ +Half of the benchmarks got at least 2.9× as fast. Copying and comparing values gained the least, and the largest +gains come from fixing algorithms rather than tuning them (theme 7). Eight themes did most of the work: -1. [Ask the input what it is](#1-ask-the-input-what-it-is), instead of reading every source one character at a time. -2. [Work on words, not bytes](#2-work-on-words-not-bytes): 8 bytes per step with plain integer arithmetic, 16 with - SSE2 on x86-64 and NEON on 64-bit Arm. -3. [Own the number conversions](#3-own-the-number-conversions): no `strtod`, no locale, no `snprintf`. -4. [Don't do work nobody reads](#4-dont-do-work-nobody-reads): positions, copies and conversions that only matter on - an error or for a rare caller. -5. [Read the assembly](#5-read-the-assembly): stack canaries, missed inlining and failed store forwarding. -6. [Write through a cursor](#6-write-through-a-cursor): no virtual call per character, no allocation per call, no - branch per integer. -7. [Fix the algorithm first](#7-fix-the-algorithm-first): seven operations were quadratic or worse. -8. [Build a different data structure](#8-build-a-different-data-structure) when you only want to read. +
+ +- 1 [Specialize for each input](#theme-1): a dedicated reader for strings, streams and `FILE*`, instead of one + character at a time for all of them. +- 2 [Work on words, not bytes](#theme-2): 8 bytes per step with plain integer arithmetic, 16 with SSE2 and NEON. +- 3 [Own the number conversions](#theme-3): no `strtod`, no locale, no `snprintf`. +- 4 [Don't do unnecessary work](#theme-4): positions, copies and conversions that only matter on an error or for a + rare caller. +- 5 [Read the assembly](#theme-5): stack canaries, missed inlining, aliasing and branches the compiler chose. +- 6 [Write through a cursor](#theme-6): no virtual call per character, no allocation per call, no branch per + integer. +- 7 [Fix the algorithm first](#theme-7): seven operations were quadratic or worse. +- 8 [Build a different data structure](#theme-8) when the tree is the cost. + +
## Where the time went: a timeline The suite compares two points. To see which change did what, we compiled one small benchmark against the header of -every commit on `develop` that changed `json.hpp` or `json_view.hpp` since 3.12.0, 315 of them, and ran all of them interleaved -(details in [How we measured](#how-we-measured)). Each panel is one workload, chosen so that each exercises a -different part of the library: +each of the 315 commits on `develop` that changed `json.hpp` or `json_view.hpp` since 3.12.0, and ran all of them +interleaved. Four of the eight workloads we followed: - `parse()` of `citm_catalog.json`: the lexer's structure and whitespace handling, and building many small objects; - `parse()` of `canada.json`: converting text to floating-point numbers; -- `accept()` of `twitter.json`: the lexer alone, since `accept()` only validates and builds nothing; -- `parse()` of `twitter.json` from an `std::ifstream`: reading from a stream instead of a string; -- `dump()` of `twitter.json` and of `canada.json`: writing strings and writing floating-point numbers; -- `from_cbor()` and `to_cbor()` of `twitter.json`: reading and writing a binary format. +- `dump()` of `twitter.json`: writing strings; +- `from_cbor()` of `twitter.json`: reading a binary format. -Each panel shows the speedup over 3.12.0 after each commit on a logarithmic scale, so that a step of 2× has the same -height everywhere; the labels name the pull requests behind the largest steps. Each point is one build, and moving code around changes a -build's speed by a few percent on its own, so only the larger steps mean something. When `accept()` of -`twitter.json` got 2.5 % slower over the last 20 commits, we timed the two ends against each other in one binary -with six code layouts: they were equal within 0.2 %. +Each panel shows the speedup over 3.12.0 after each commit, on a logarithmic scale so that a step of 2× has the same +height everywhere. The badges above the steps name the theme below that explains them. Moving code around changes a +build's speed by a few percent on its own, so only the larger steps mean something.
@@ -124,52 +104,32 @@ with six code layouts: they were equal within 0.2 %. --8<-- "images/perf_blog_timeline_parse_canada.svg"
---8<-- "images/perf_blog_timeline_accept_twitter.svg" -
-
---8<-- "images/perf_blog_timeline_parse_twitter_ifstream.svg" -
-
--8<-- "images/perf_blog_timeline_dump_twitter.svg"
---8<-- "images/perf_blog_timeline_dump_canada.svg" -
-
--8<-- "images/perf_blog_timeline_from_cbor_twitter.svg"
-
---8<-- "images/perf_blog_timeline_to_cbor_twitter.svg" -
-

Speedup over 3.12.0 of eight workloads after each of the 315 commits that changed the headers, from 3.12.0 (left) to the 3.13.0 candidate (right). More is better; each point is the median of 4 interleaved runs of one build.

+

Speedup over 3.12.0 after each of the 315 commits that changed the headers, from 3.12.0 (left) to 3.13.0 (right). More is better; each point is the median of 4 interleaved runs of one build. The badges are theme numbers; "U" is a UTF-8 check that came and went. The other four workloads, and every labeled step with its pull request and size, are in [Appendix C](#c-the-timeline).

A few things stand out: -- **There is no single big step.** Parsing `citm_catalog.json` got faster in about a dozen visible steps; the largest - are a buffer that only error messages read ([#5234][5234], −35 %), the contiguous-input fast paths - ([#5283][5283], −20 %), and two consecutive PRs that each took 12 %: positions derived only on error - ([#5809][5809]) and skipping indentation eight bytes at a time ([#5810][5810]). Most other PRs each moved it by 2 - to 7 %. -- **Writing had a few large steps.** `dump()` of `twitter.json` lost 70 % of its time in one PR ([#5285][5285]: the - write buffer and the bulk string copy), and `dump()` of `canada.json` 65 % in another ([#5634][5634]: Żmij). -- **Some steps come from outside.** Two of the larger ones were contributed: [#5592][5592] by - [@mvanslobbe](https://github.com/mvanslobbe) checks for the expected `:` or `,` before the lexer's token switch - (−7 % on `citm_catalog.json`), and [#5328][5328] by [@alexprabhat99](https://github.com/alexprabhat99) stopped - creating a temporary `basic_json` for every object key that `to_cbor()` writes (−55 %). -- **Regressions happen in between.** [#5185][5185] added UTF-8 validation of every text string to the binary - readers, byte by byte. `from_cbor()` of `twitter.json` then took 37 % longer for 66 commits, until - [#5746][5746] (with [#5741][5741]) made the readers lenient again by default, as in 3.12.0, and the check an - option. That decision was about the format specifications, which don't require a decoder to check, not about - speed; the cost went with it. It never shipped in a release. -- **The parse panels include destroying the result.** The benchmark returns `json::parse(text).size()`, so the - destructor PRs ([#5762][5762], [#5835][5835]) show up in the parse panels too, as steps of up to 6 % in either - direction. -- **The input decides how big a step is.** #5234 measured 8 % on its own benchmark; on the indented - `citm_catalog.json` the same change saved 35 %, because every space went through the buffer it removed. +- **There is no single big step.** Parsing `citm_catalog.json` got faster in about a dozen visible steps. The largest + removed a buffer that only error messages read, which alone saved a third of the time. The next ones added the fast + paths for contiguous input, derived positions only on error and skipped indentation eight bytes at a time; most + other changes moved it by a few percent. +- **Writing had a few large steps.** `dump()` of `twitter.json` lost 70 % of its time in one change (a write buffer + and bulk string copies), and `dump()` of `canada.json` 65 % in another (Żmij). +- **Regressions happen in between.** A UTF-8 check of every text string in the binary readers, byte by byte, made + `from_cbor()` of `twitter.json` 37 % slower for 66 commits, until the readers were made lenient again by default, as + in 3.12.0, with the check as an option. That decision was about the format specifications, which don't require a + decoder to check, not about speed; the cost went with it. It never shipped in a release. +- **The input decides how big a step is.** Removing the error-message buffer measured 8 % on the benchmark of its pull + request; on the indented `citm_catalog.json` it saved 35 %, because every space of the indentation went through + that buffer. -## 1. Ask the input what it is +## 1 Specialize for each input { #theme-1 } This is the function the 3.12.0 lexer called for **every** byte of input: @@ -204,13 +164,16 @@ char_int_type get() } ``` -Two counters in memory, a branch for a pending `unget()`, a call into the input adapter, a `push_back()` into a -buffer that only an error message reads, and a branch for line breaks. A string or a number then copied each byte a -second time into the token buffer. That is a clean design: one interface works for a `std::string`, an `std::istream`, -a `FILE*`, a pair of iterators over a `std::list`, or a user's own adapter. But it makes every input pay for the -most limited one. +

The 3.12.0 lexer's `get()`, called for every byte of input.

-3.13.0 asks the input what it can do and picks a path at compile time: +Two counters in memory, a branch for a pending `unget()`, a call into the input adapter, a `push_back()` into a +buffer that only an error message reads, and a branch for line breaks. The counters are members of the lexer, so the +compiler has to load, add and store them for every byte. A string or a number then copied each byte a second time into +the token buffer. That is a clean design: one interface works for a `std::string`, an `std::istream`, a `FILE*`, a +pair of iterators over a `std::list`, or a user's own adapter. But it makes every input pay for the most limited +one. + +3.13.0 has a dedicated reader for each kind of input and picks it at compile time: ```mermaid flowchart LR @@ -223,32 +186,83 @@ flowchart LR

The four kinds of input the lexer distinguishes in 3.13.0. Everything on the fast paths falls back to the byte path on anything unusual, so the result and the error messages stay the same.

-**Contiguous input** ([#5283][5283]). `std::string`, `std::vector` and the like now go through a pointer-based -adapter in every C++ standard, not only C++20. On top of that, strings, numbers and runs of whitespace are scanned in -bulk (themes 2 and 3). Every fast path defers to the byte path on anything malformed, so error messages and `byte` -positions stay the same, with one deliberate correction (the column after a number at the end of a line); the PR -checked that on 481,000 documents. +### Detecting the input in C++11 -**Positions only when someone asks** ([#5809][5809]). For seekable input, the lexer no longer counts lines and -columns while it reads. The byte offset is the distance from the start; lines and columns are recomputed from the -consumed input when an error message needs them. This is what serde_json's slice reader does. On an M1 Max, it made -parsing `citm_catalog.json` 11.8 % faster and validating an indented `twitter.json` 22 % faster. +An input adapter can declare what it supports as static members (`supports_seek`, +`supports_bulk_scan`, and a few more). The lexer detects them with the detection idiom, so a user's adapter that +declares nothing keeps the byte path: -**Streams** ([#5828][5828], [#5884][5884]). An `std::istream` already has a buffer: the get area of its `streambuf` -(`gptr()` to `egptr()`). The lexer now scans that window in bulk, keeps the current token as a pointer into it, and -copies only the part that is about to be refilled. Nothing is read ahead, so the stream is left exactly where it was -before. Reaching the protected get area takes no cast: member pointers formed in a class derived from -`std::streambuf`, so the access rule for protected members applies as intended. Before, parsing from an -`std::ifstream` took 1.8 to 2.5 times as long as reading the file into a string first; after #5828, it takes 11 to -18 % longer. +```cpp +template using detect_supports_seek = decltype(A::supports_seek); +template +constexpr bool input_adapter_supports_seek(std::true_type) { return A::supports_seek; } +template +constexpr bool input_adapter_supports_seek(std::false_type) { return false; } -**`FILE*`** ([#5828][5828]). `std::fgetc` locks the `FILE` on every call. 3.13.0 locks it once per parse -(`flockfile`, then `getc_unlocked`; `_lock_file` and `_fgetc_nolock` with the Microsoft runtime). On macOS, this made -parsing `citm_catalog.json` from a `FILE*` 4.4 times as fast (34.1 ms to 7.8 ms). With glibc the gain was only 1.1 to -1.3×, because glibc's per-call locking is already cheap. The lock is held for the whole parse, which the documentation -now mentions, and both changes have opt-out macros. +static constexpr bool seekable = input_adapter_supports_seek( + is_detected {}); +static constexpr bool lazy_position = seekable; +``` -## 2. Work on words, not bytes +

Detecting a static member of the input adapter with the detection idiom: an adapter that doesn't declare `supports_seek` is not seekable.

+ +Without `if constexpr`, the flags select overloads by tag dispatch, `f(std::integral_constant{})`, +which also keeps MSVC from warning about constant conditions. `get()` still looks like the old one, but its position +and token bookkeeping are now calls whose `std::true_type` overloads are empty. For a `std::string`, what remains is +the branch on `next_unget` and the adapter's bounds check and pointer increment. + +### Contiguous input + +Containers with `data()` and `size()` over single-byte elements now become a `const char*` +range in every C++ standard, not only with C++20's contiguous iterators. `data()` and `size()` alone would be duck +typing, so the trait also requires the container's `value_type` to be the element type behind `data()`; a type whose +`size()` counts something else keeps the iterator path, which is slower but correct. On a pointer range, strings, +numbers and runs of whitespace are scanned in bulk (themes 2 and 3). Every fast path defers to the byte path on +anything malformed, so error messages and byte positions stay the same, with one deliberate correction (the column +after a number at the end of a line). [Appendix J](#j-validation) describes how that was checked. + +### Streams + +An `std::istream` already has a buffer: the get area of its `streambuf`, `gptr()` to `egptr()`. The lexer +now scans that window in bulk and keeps the current token as a pointer into it. Those are protected members of +`std::streambuf`, and reaching them takes neither a cast nor a derived object: + +```cpp +struct streambuf_access : std::streambuf +{ + static const char* get_ptr(std::streambuf* s) { return (s->*(&streambuf_access::gptr))(); } + static const char* get_end(std::streambuf* s) { return (s->*(&streambuf_access::egptr))(); } + static void bump(std::streambuf* s, int n) { (s->*(&streambuf_access::gbump))(n); } +}; +``` + +

Reaching the protected get area of any `std::streambuf` through pointers to members, without a cast.

+ +A derived class may name a protected member of its base in a pointer to member, as long as it qualifies the name with +its own class. The resulting pointer has the type `char* (std::streambuf::*)() const`, and access is checked when the +name is used, not when the pointer is called, so it works on any `std::streambuf*`. The common alternative, +`static_cast(sb)->gptr()`, is undefined behavior, because the object is not a `streambuf_access`. + +Before the stream refills its get area, the adapter appends the part of the current token that is in it to a carry +buffer; only an error message ever reads the token text back. Nothing is read ahead: the adapter advances `gptr()` +by exactly what the lexer consumes, so the stream is left where it was before. On an M1 Max, parsing from an +`std::ifstream` used to take 1.8 to 2.5 times as long as reading the file into a string and parsing that; now it takes 11 to 18 % longer. + +### `FILE*` + +`std::fgetc` locks the `FILE` on every call. 3.13.0 locks it once per parse (`flockfile`, then +`getc_unlocked`; `_lock_file` and `_fgetc_nolock` with the Microsoft runtime). `flockfile` is recursive, so the binary +readers' `fread()` and a SAX handler's own `ftell()` keep working. On macOS, parsing `citm_catalog.json` from a +`FILE*` got 4.4 times as fast in the pull request's measurement; with glibc only 1.1 to 1.3 times, +because glibc's per-call locking is already cheap. Two details: MemorySanitizer builds keep `fgetc`, because glibc's inline `getc_unlocked` +reads a buffer that uninstrumented glibc filled; and a SAX handler that waits for another thread using the same +`FILE` now deadlocks, which the documentation says. Both paths can be switched off, with +[`JSON_DISABLE_STREAM_BULK_SCAN`](../../api/macros/json_disable_stream_bulk_scan.md) and +[`JSON_DISABLE_UNLOCKED_FILE_IO`](../../api/macros/json_disable_unlocked_file_io.md). + +## 2 Work on words, not bytes { #theme-2 } + +### Eight bytes in a word The core of a JSON lexer is "copy bytes until something interesting happens". In a string, the interesting bytes are the closing quote, a backslash, a control character, and anything above 0x7F (UTF-8). This test checks eight bytes at @@ -271,11 +285,13 @@ inline std::uint64_t swar_string_special(std::uint64_t v) noexcept } ``` +

The eight-byte test of the string scanner, in portable C++11.

+ XOR with the quote turns every quote byte into zero, and `(x - 0x01…01) & ~x & 0x80…80` sets the high bit of the bytes that were zero: the "determine if a word has a zero byte" trick from Sean Eron Anderson's -[Bit Twiddling Hacks](https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord). When the result is not -zero, the number of trailing zero bits divided by eight is the index of the first special byte. The subtraction can -also flag a byte *after* a real hit (a borrow), but never one before it, so the lowest flag is always right. +[Bit Twiddling Hacks](https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord). The subtraction's borrow +runs only upwards, so it can flag a byte *after* a real hit, but never one before it: the lowest flag is always right, +and the number of trailing zero bits divided by eight is the index of the first special byte.
--8<-- "images/perf_blog_swar.svg" @@ -283,61 +299,145 @@ also flag a byte *after* a real hit (a borrow), but never one before it, so the

`swar_string_special()` on the last eight bytes of `"twitter",`: one word in, one flag out, and the count of trailing zero bits says how many bytes can be copied before the quote.

-The same kind of word test, written in standard C++11 with a `memcpy` load and a fallback for big-endian targets, -now runs in many places: +Two details make this portable C++11. The word is loaded with `std::memcpy`, which compilers turn into one load and +which, unlike a `reinterpret_cast`, doesn't break the aliasing rules. And the load always produces the bytes in +little-endian order, so the first byte of the text is the lowest byte of the word everywhere; a big-endian target +assembles the word from bytes, which compilers fold into a load and a byte swap. Every loop checks that eight bytes +remain before it loads, and finishes the last seven bytes one at a time, so nothing is read past the input. -| where | what it skips | PR | -| --- | --- | --- | -| lexer: strings | runs of ordinary characters, and runs of well-formed multi-byte UTF-8 | [#5283][5283], [#5738][5738] | -| lexer: indentation | eight spaces per step after a newline, an idea from Glaze's `skip_matching_ws` | [#5810][5810] | -| lexer: numbers | eight digits per step, as fast_float does | [#5738][5738], [#5851][5851] | -| `dump()` | runs that need no escaping, with and without `ensure_ascii` | [#5285][5285] | -| `json_view` `dump()` | ASCII runs with `ensure_ascii` | [#5879][5879] | +The same kind of word test now runs in several places: -

Where the eight-byte test is used in 3.13.0, and the pull requests that added it.

+- **Strings in the lexer,** including runs of well-formed multi-byte UTF-8, which are validated one sequence after + the other without going back to the byte loop. +- **Numbers,** eight digits per step (theme 3). +- **Indentation.** After a newline, `word ^ 0x2020…20` is zero for eight spaces; the first non-zero byte ends the + indentation, and its trailing-zero count says how many spaces of the last word to skip as well. The idea is from + [Glaze](https://github.com/stephenberry/glaze)'s `skip_matching_ws`, which compares with the previous line's indentation; comparing with spaces needs no + state and works for any indentation width. A version that skipped only whole words was 5 to 12 % slower and gave + nothing on two-space indentation, where the runs are often shorter than a word. With four-space indentation, + validating `citm_catalog.json` got 22 to 30 % faster. +- **[`dump()`](../../api/basic_json/dump.md),** for runs of characters that need no escaping, with and without + [`ensure_ascii`](../../api/basic_json/dump.md#parameters). -Where a vector unit is part of the baseline instruction set (SSE2 on x86-64, NEON on 64-bit Arm), the string paths -use 16 bytes per step ([#5853][5853], [#5628][5628]). Non-ASCII text is validated 16 bytes at a time with simdjson's -"lookup4" UTF-8 check (Keiser and Lemire, 2021). That is the one place that needs more than the baseline: on x86-64 -it uses SSSE3, which is checked once per process with `cpuid`. `JSON_NO_SIMD` turns all vector code off. On -`twitter.json`, #5853 made `json::parse()` 5 % faster with Clang and 9 % with GCC on an M1 Max; on long strings, 19 -to 24 %. +### 16 bytes with SSE2 and NEON -**Short strings are a different problem.** Most keys and many values are short: `citm_catalog.json` averages 8 bytes -per string and `jeopardy.json` 14. For them, setting up a scan costs more than the scan. [#5878][5878] took the idea -of SQLite's `jsonAppendString()`: check each byte of a string of up to 32 bytes against a 256-entry table of bytes +Where a vector unit is part of the baseline instruction set (SSE2 on x86-64, NEON on +64-bit Arm), the string paths take 16 bytes per step. Two details are worth stealing. A signed comparison +`byte < 0x20` catches control characters *and* every byte from 0x80, because those are negative as `int8_t`, so four +classes of bytes take three comparisons. And NEON has no equivalent of x86's `pmovmskb`, which turns a vector of +comparison results into a bit mask. The usual replacement, after +[Danila Kutenin](https://developer.arm.com/community/arm-community-blogs/b/servers-and-cloud-computing-blog/posts/porting-x86-vector-bitmask-optimizations-to-arm-neon), +shifts each 16-bit lane right by four +and narrows it to eight bits, which leaves four bits per input byte in a 64-bit integer: + +```cpp +const uint8x16_t in = vld1q_u8(p); +const uint8x16_t quote_or_backslash = vorrq_u8(vceqq_u8(in, vdupq_n_u8('"')), + vceqq_u8(in, vdupq_n_u8('\\'))); +const uint8x16_t special = vorrq_u8(quote_or_backslash, + vcltq_s8(vreinterpretq_s8_u8(in), vdupq_n_s8(0x20))); +const uint8x8_t nibbles = vshrn_n_u16(vreinterpretq_u16_u8(special), 4); +const std::uint64_t bits = vget_lane_u64(vreinterpret_u64_u8(nibbles), 0); +if (bits != 0) +{ + return p + (count_trailing_zeros(bits) >> 2u); // four bits per byte +} +``` + +

The NEON string scan: three comparisons for four classes of bytes, and a narrowing shift in place of `pmovmskb`.

+ +On `twitter.json`, the vector scan made `json::parse()` 5 % faster with Clang and 9 % with GCC on an M1 Max; on long +strings, 19 to 24 %. It did not win from the first byte. On the M1, starting with NEON made short strings 3 to 4 % +slower and the lexer's hot function bigger, so ARM runs four 8-byte words first and keeps the vector loop out of line; +x86-64 runs one word first. Inlining the vector code into the lexer cost 5 % of validating `jeopardy.json` on the M1, +although no string of that file is long enough to reach it: the vector constants occupied registers that every token +needed. + +### Validating UTF-8 16 bytes at a time + +Validating UTF-8 16 bytes at a time uses [simdjson](https://github.com/simdjson/simdjson)'s "lookup4" algorithm +([Keiser and Lemire, 2021](https://arxiv.org/abs/2010.03090)): three +16-entry tables, indexed by nibbles of a byte and of the byte before it, each give the set of errors that nibble +allows, and a pair of bytes is invalid if all three sets share an error. It needs `pshufb`, which is SSSE3 and not part +of baseline x86-64. The function is compiled with `__attribute__((target("ssse3")))`, out of line, and called only if +`cpuid` says so. The answer is cached in a constant-initialized `static std::atomic`, so that neither a guarded +local static nor a global constructor is needed; threads that ask at the same time all store the same answer. On an +error, the code backs up to the start of the sequence and lets the byte path produce the error message. +[`JSON_NO_SIMD`](../../api/macros/json_no_simd.md) turns all vector code off. + +### Short strings + +Short strings are a different problem. Most keys and many values are short: `citm_catalog.json` averages 8 bytes +per string and `jeopardy.json` 14. For them, setting up a scan costs more than the scan. The first step took the idea +of [SQLite](https://sqlite.org/src/file/src/json.c)'s `jsonAppendString()`: check each byte of a string of up to 32 bytes against a 256-entry table of bytes that can be written unchanged, and copy the string in one go if they all pass. 32 bytes was the best threshold on the -M1; 16 gained less, and 64 lost again. [#5883][5883] then replaced the table, where SSE2 or NEON is available, with two -overlapping loads: a string of 16 to 32 characters is two 16-byte vectors that overlap in the middle, tested once and -stored with two stores, together with its quotes. That cut the instructions of `twitter.json`'s `dump()` by 21 %. -The table stays as the fallback for other targets. +M1; 16 gained less, and 64 lost again. The second step replaced the table, where SSE2 or NEON is available, with +overlapping loads: -**Escapes come from a table, too.** When the scanner stops at a quote, a backslash or a control character, -[#5822][5822] copies its escape sequence from a table of 8-byte rows (padded with zeros, length in the last byte) -straight into the write buffer: one 8-byte copy and one add, an idea from orjson's `QUOTE_TAB` (which orjson took -from sonic-rs). On an M1 Max, that -made dumping 100,000 log lines full of `\n`, `\t` and quotes 23 % faster. Most of that, the PR found, comes from -writing straight into the write buffer instead of going through an intermediate one; the table alone gained 2 to -7 %. +```cpp +// 16 <= n <= 32: two loads that overlap in the middle cover the whole string +const uint8x16_t a = vld1q_u8(p); +const uint8x16_t b = vld1q_u8(p + n - 16); +const uint8x16_t special = /* '"', '\\', < 0x20 or 0x7F, in a or in b */; +if (vmaxvq_u8(special) != 0) +{ + return false; // nothing has been written yet; take the general path +} +vst1q_u8(d, a); +vst1q_u8(d + n - 16, b); // the two stores overlap too, with the same bytes +``` + +

Writing a string of 16 to 32 bytes with two overlapping loads and stores (NEON).

+ +Both loads lie inside the string, together they cover all of it, and all tests happen before the first store. Shorter +strings use the same trick with two overlapping 8-, 4- or 2-byte loads, so no `memcpy` with a length known only at run +time is left. On `twitter.json`, +this cut the instructions of `dump()` by 21 %. + +### Escapes from a table + +When the scanner stops at a quote, a backslash or a control character, the +writer copies its escape sequence from a table of 8-byte rows, padded with zeros, with the length in the last byte: + +```cpp +{{'\\', 'u', '0', '0', '0', '0', 0, 6}}, // 0x00 +{{'\\', 'n', 0, 0, 0, 0, 0, 2}}, // 0x0A +{{'\\', '"', 0, 0, 0, 0, 0, 2}}, // 0x22 + +std::memcpy(write_buffer.data() + write_buffer_pos, escape.data(), 8); // always 8 bytes +write_buffer_pos += escape[7]; // keep only the real length +``` + +

Three rows of the escape table, and how a row is written: always 8 bytes, then the real length.

+ +One 8-byte store and one add, with no branch on the length; the padding lies behind the write position and is +overwritten by the next write. The writer makes sure that 8 bytes are free before it copies. The idea is from [orjson](https://github.com/ijl/orjson)'s +`QUOTE_TAB`, which orjson took from [sonic-rs](https://github.com/cloudwego/sonic-rs). Dumping 100,000 log lines full of `\n`, `\t` and quotes got 23 % faster +on an M1 Max, but most of that came from writing straight into the write buffer instead of an intermediate one; the +table alone gained 2 to 7 %. !!! note "Loop shape beats branch count" - Not every change in this direction worked the first time. The first version of [#5490][5490] removed one - branch per whitespace byte and made deeply nested `dump(4)` output parse 3.2 times *slower* with Clang. The - rewritten loop no longer let either compiler keep the input's read and end pointers in registers, so both - reloaded them from memory on every character. Restoring the original `do`-`while` shape, guarded by an `if`, - fixed it. + Not every change in this direction worked the first time. A change that removed one branch per whitespace byte + made scanning deeply nested `dump(4)` output 3.2 times *slower* with Clang. It had rewritten + `do { get(); } while (is_whitespace());` into `get(); while (is_whitespace()) { get_without_unget_check(); }`, + and after that, neither Clang nor GCC kept the input's read and end pointers in registers: they reloaded them from + memory on every character. `get(); if (is_whitespace()) { do { ... } while (is_whitespace()); }` fixed it. -## 3. Own the number conversions +## 3 Own the number conversions { #theme-3 } 3.12.0 converted every floating-point number with `strtod` and every integer with `strtoull` or `strtoll`, after copying the token into a buffer. `strtod` is correct, but general: it consults the locale for the decimal point, sets -`errno`, and handles any length of input. +`errno`, and handles any length of input. `std::from_chars` would avoid the locale, but it doesn't exist before C++17, +and libc++ has its floating-point overloads without defining `__cpp_lib_to_chars`, so macOS builds could not detect +it. `canada.json`, a GeoJSON file of 111,126 numbers, shows what that costs. 108,528 of its numbers have 16 to 19 -significant digits, like `-65.613616999999977`. The classic shortcut, Clinger's fast path, needs the digits to fit -into the 53 bits of a `double` (at most 9,007,199,254,740,992) and the power of ten to be exact (at most 10²²): then a -single multiplication or division is correctly rounded. For most of `canada.json`'s numbers, the digits don't fit. +significant digits, like `-65.613616999999977`. The classic shortcut is Clinger's fast path +([Clinger, 1990](https://doi.org/10.1145/93542.93557)): write the number as its digits `w` times a power of ten, +convert `w` to a `double`, and multiply or divide it by that power of ten. If both are exact as `double`, that is, `w` +is at most 2⁵³ (9,007,199,254,740,992) and the power at most 10²², the operation rounds only once, and the result is +the correctly rounded `double`. For most of `canada.json`'s numbers, `w` doesn't fit into 53 bits. 3.13.0 converts numbers itself, without the C library and without the locale: @@ -355,110 +455,386 @@ flowchart TB

How 3.13.0 converts a decimal token to a `double`. Of `canada.json`'s 111,080 floating-point numbers, 9,742 take Clinger's fast path and 101,338 Eisel-Lemire; none has more than 19 digits.

-The Eisel-Lemire algorithm is adapted from fast_float's `compute_float` ([#5617][5617]), and it gives the correctly -rounded result for up to 19 digits without a fallback (Mushtak and Lemire, 2023). For longer numbers, -[#5738][5738] added fast_float's digit comparison. The table of 128-bit powers of five is fast_float's too. Then -[#5851][5851] stopped scanning the digits twice: the lexer now accumulates the value while it validates the token, -eight digits at a time with fast_float's `is_eight_digits` and `parse_eight_digits`, and a float of up to 19 digits -goes straight into the conversion with no call left on the way. +### Eight digits at a time -For output, 3.12.0 used Grisu2, which is fast but sometimes writes a 17th digit where 16 suffice. -[#5634][5634] ported [Żmij](https://github.com/vitaut/zmij) by Victor Zverovich to C++11. It writes the shortest -decimal that reads back as the same `double`, and the closest one if there are several. Its digit conversion, by -Xiang JunBo, turns eight digits into text per step, and the SIMD sequence by Dougall Johnson formats all 16 digits -in one vector register, decimal point included. The PR found one more stall on the way: the old code stored the -digits and immediately loaded them again shifted by one byte, and a load that overlaps two smaller stores can't be -forwarded from the store buffer. On an M1 Max, `dump()` of `canada.json` went from 6,987 µs to 2,405 µs (−66 %), and -on an x86-64 Haswell machine by −70 % (GCC 13) and −72 % (Clang 18). +The lexer accumulates the value while it validates the token, so the digits are read once. +The core is [fast_float](https://github.com/fastfloat/fast_float)'s eight-digit conversion: three +multiplications instead of eight. -That one is not free of visible change. Of one million random `double` bit patterns, 1,425 (0.14 %) are now written -differently: 810 with fewer digits (`5.3165205877497296e+16` becomes `5.31652058774973e+16`), 615 with the same -number of digits but the closer ones. They all read back as the same `double`, and none of one million short -decimals changes. In `canada.json`, 69 of the 111,126 numbers come out differently. +```cpp +// v: eight ASCII digits, the first digit in the lowest byte +std::uint32_t parse_eight_digits(std::uint64_t v) noexcept +{ + v = ((v & 0x0F0F0F0F0F0F0F0Fu) * 2561u) >> 8u; // 2561 = 10 * 2^8 + 1 + v = ((v & 0x00FF00FF00FF00FFu) * 6553601u) >> 16u; // 6553601 = 100 * 2^16 + 1 + v = ((v & 0x0000FFFF0000FFFFu) * 42949672960001u) >> 32u; // 10000 * 2^32 + 1 + return static_cast(v); +} +``` -## 4. Don't do work nobody reads +

fast_float's conversion of eight ASCII digits to their value, with three multiplications.

+ +The mask turns the characters into digit values. Multiplying by `10·2⁸ + 1` adds ten times each byte to the byte +above it, so after the shift every second byte holds a two-digit number: `"12345678"` becomes 12, 34, 56 and 78. The +second step does the same with pairs of bytes and a factor of 100 (1234 and 5678), the third with 32-bit halves and +10,000. Whether all eight bytes are digits is one more expression: a digit is 0x30 to 0x39, so its high nibble must be +3, and adding 6 must keep it 3. Integers of up to 18 digits and floats of up to 19 then need no overflow check at all. + +### Clinger's fast path + +Clinger's fast path is guarded by more than the two conditions above: + +```cpp +#if !defined(FLT_EVAL_METHOD) || FLT_EVAL_METHOD == 0 +if (exponent >= -22 && exponent <= 22 && w <= (std::uint64_t{1} << 53)) +{ + double value = static_cast(w); + value = exponent < 0 ? value / exact_power_of_ten(-exponent) + : value * exact_power_of_ten(exponent); + return negative ? -value : value; +} +#endif +``` + +

Clinger's fast path: one correctly rounded multiplication or division, only without x87 extended precision.

+ +With x87 arithmetic (`FLT_EVAL_METHOD != 0`), the intermediate result has extended precision and is rounded twice, so +those targets skip the fast path and take the integer-only route below. + +### Eisel-Lemire + +[Eisel-Lemire](https://arxiv.org/abs/2101.11408), adapted from fast_float's `compute_float`, handles everything else with integers only: it multiplies +the digits with a 128-bit approximation of `5^q` from a table and takes the mantissa from the top of the product. For +up to 19 digits, that always suffices ([Mushtak and Lemire, 2023](https://arxiv.org/abs/2212.06644)). Longer numbers, rare in JSON, are bracketed by +their first 19 digits and that plus one; only if the two round differently are all digits compared with the exact +midpoint. [Appendix I](#i-details-of-the-themes) has the details. Because it is integer arithmetic, the result no +longer depends on the C locale. (JSON always uses `.`, but `strtod` expects the locale's decimal separator, so 3.12.0 +replaced the `.` before calling it, which failed for separators longer than one byte, [#5660][5660].) +[Appendix J](#j-validation) describes how the conversion was checked against `strtod`. + +### Writing: Żmij + +For output, 3.12.0 used [Grisu2](https://doi.org/10.1145/1806596.1806623), which is fast but sometimes writes a 17th digit where 16 suffice. +3.13.0 ports [Żmij](https://github.com/vitaut/zmij) by Victor Zverovich to C++11. It writes the shortest decimal that +reads back as the same `double`, and the closest one if there are several. Its digit conversion, by Xiang JunBo, is +the parser's divide-by-multiplying idea run backwards on all lanes of a word at once ([Appendix +I](#i-details-of-the-themes) shows it), and with SSE2 or NEON, a sequence by Dougall Johnson (in +[Żmij's source](https://github.com/vitaut/zmij)) converts all 16 digits in one vector register. + +One stall turned up on the way. The straightforward way to insert the decimal point stores the digits, loads them +back starting one byte further, and stores them shifted. That load overlaps two earlier, smaller stores, and an x86 +core cannot forward such a load from its store buffer: it waits until the stores have reached the cache. The commit +measured that as about 25 % of the time to write a `double`. The vector version never goes through memory: it compares +a vector of positions 0 to 15 with the position of the point, keeps the digits before it, shifts the rest up one byte +in the register, puts `'.'` into the gap, and stores 16 bytes once. + +In the pull request's measurement, `dump()` of `canada.json` got about three times as fast, on an M1 Max as well as +on an x86-64 Haswell machine with GCC and Clang. The changed output is listed in [Appendix F](#f-behavior-changes): 0.14 % of random +`double`s are written differently, all of them with the same or fewer digits, and all of them read back as the same +value. + +## 4 Don't do unnecessary work { #theme-4 } A lot of what the 3.12.0 parser did was correct, cheap per call, and read by nobody in the common case. -- **The text of float tokens** ([#5852][5852]). The lexer copied every float token into a buffer so that a SAX - handler's `number_float(val, s)` could see the original text. That copy was about 10 % of parsing `canada.json`. - The built-in handlers behind `parse()` and `accept()` never look at it, so they now get an empty string, and the - lexer copies the text only for user handlers that might. -- **The token buffer** ([#5234][5234]). `get()` pushed every character into `token_string`, a buffer that only the - "last read" part of an error message uses. For contiguous input, the lexer now remembers where the token started and - rebuilds that text from the input if an error happens. The PR measured 8 % on its own benchmark; in the timeline, - parsing the indented `citm_catalog.json` got 35 % faster at that commit, because every space of the indentation - went through the buffer. [#5828][5828] did the same for streams, where the copy was about 20 % of the remaining - cost. -- **Positions** (#5809, above): lines and columns are counted only when an error message needs them. -- **Copies that should have been moves.** `from_cbor()` and the other binary readers ended with - `return res ? result : basic_json(value_t::discarded);`. The conditional operator's operand is an lvalue, so there - is no implicit move: every successfully parsed value was deep-copied once and then destroyed. Returning it by move - ([#5501][5501]) took decoding a 2 MB CBOR document from 26.99 ms to 14.65 ms. -- **`ordered_json` growth** ([#5609][5609]). `ordered_json` stores its members in a - `std::vector>`. Because the key is `const`, the pair's move constructor copies - the key and can throw, so `std::vector` copies every element when it grows, including the whole subtree of every - value. The library now grows that storage itself: keys copied, values moved. Parsing `twitter.json` into - `ordered_json` dropped from 60,456 to 19,182 allocations and from 3.20 ms to 1.70 ms. -- **Members that are inserted one at a time** ([#5882][5882]). The DOM parser now allocates each array once, at its - final size, and collects the members of an `ordered_json` object until the object is complete; big objects get - a hash table for the duplicate-key check. An object with very many members went - from 43 million instructions to 1.9 million. Since then, `ordered_json` parses 1 to 15 % *faster* than `json` in our suite, whose `std::map` still allocates a node per member. +### The token buffer + +The old `get()` of theme 1 pushed every character into `token_string`, a buffer that only the "last +read" part of an error message uses. For seekable input, the lexer now remembers the offset where the token started +and copies the text from the input if an error happens. The pull request measured 8 % on its own benchmark; in the +timeline, parsing the indented `citm_catalog.json` got 35 % faster at that commit, because every space of the +indentation went through the buffer. For streams, the carry buffer of theme 1 does the same job; the per-character +copy had been about 20 % of what was left of a stream parse. + +### Positions only on error + +For input that can be seeked, the lexer no longer counts lines and columns. +The byte offset is the distance from the start, and lines and columns are recomputed only when an error message needs +them: + +```cpp +std::size_t count_consumed_lines(std::size_t last_index, std::size_t& line_start) const +{ + const auto to = std::next(begin, last_index); + using reverse_it = std::reverse_iterator; + const auto last_newline = std::find(reverse_it(to), reverse_it(begin), '\n'); + line_start = std::distance(begin, last_newline.base()); // column: offset - line_start + return std::count(begin, last_newline.base(), '\n'); // line: newlines before it +} +``` + +

Line and column of an error, computed from the byte offset only when an error message needs them.

+ +That is linear in the input, but only an error pays for it. It is what [serde_json's slice reader](https://github.com/serde-rs/json/blob/master/src/read.rs) does +(`position_of_index()` with `memrchr` and a newline count). A pending `unget()` is a flag, and the offset subtracts +one for it, so `unget()` does no position work at all. Measuring the two parts of the old `get()` separately on an M1 +showed that the newline branch cost more than the counters: removing only the branch saved 16 % of validating an indented +`twitter.json`, removing only the increments 4 %. Parsing `citm_catalog.json` got 12 % faster. + +### The text of float tokens + +The lexer copied every float token into a buffer so that a SAX handler's +`number_float(val, s)` could see the original text: an out-of-line `std::string::append` per float, about 10 % of +parsing `canada.json`. The handlers behind [`parse()`](../../api/basic_json/parse.md) and [`accept()`](../../api/basic_json/accept.md) never look at it. The parser now recognizes them +by their exact type: + +```cpp +template struct sax_ignores_number_text : std::false_type {}; +template +struct sax_ignores_number_text> : std::true_type {}; +template +struct sax_ignores_number_text> : std::true_type {}; + +// at the call site +sax->number_float(res, number_float_text(sax)); // an empty string for the handlers above +``` + +

Recognizing the library's own SAX handlers, which never read the text of a float token.

+ +A class derived from `json_sax_dom_parser` does not match the specialization, so it keeps getting the exact text. For +every other handler, the lexer only records a pointer to the token and its length, and copies on the first +`get_string()`. That is safe for contiguous input, which has to outlive the parse anyway; in a stream's window, the +next refill could overwrite the text, so there the copy is made at once. The first version put the "is there pending +text?" check into the `get_string()` that keys and strings use too, and lost 2 to 3 % on string-heavy input; they now +call a separate function without the check. Parsing `canada.json` got 9 to 11 % faster. + +### A copy that should have been a move + +[`from_cbor()`](../../api/basic_json/from_cbor.md) and the other binary readers ended like this: + +```cpp +return res ? result : basic_json(value_t::discarded); // 3.12.0 +``` + +

The end of the 3.12.0 binary readers: the conditional operator copies `result`.

+ +`result` is a local, but the conditional operator's operand is an lvalue expression, and the implicit move on +`return` applies only to a returned name. So every successfully parsed value was deep-copied once and then destroyed. +3.13.0 assigns `discarded` to `result` on failure and returns `result` by name. Decoding a 2 MB CBOR document went +from 26.99 ms to 14.65 ms. The copy was also a stack-overflow risk: the copy constructor recursed once per level, for +a value the reader had already accepted. + +### `ordered_json` growth + +[`ordered_json`](../../api/ordered_json.md) stores its members in a `std::vector>`. +Because the key is `const`, the pair's "move" constructor copies the key and can throw. When `std::vector` grows, it +uses `std::move_if_noexcept` to keep the strong exception guarantee, so for this element type it copies every element, +including the whole subtree behind every value. The library now grows the storage itself, in two phases: + +```cpp +// phase 1, may throw but only touches tmp: +// copy the keys, default-construct the values, add the new element +Container tmp(this->get_allocator()); +tmp.reserve((std::max)(size_type{1}, 2 * this->size())); +for (const auto& element : *this) + tmp.emplace_back(std::piecewise_construct, std::forward_as_tuple(element.first), + std::forward_as_tuple()); +tmp.emplace_back(std::forward(args)...); +// phase 2, cannot throw: move-assign the values, adopt the storage +auto it = tmp.begin(); +for (auto& element : *this) { it->second = std::move(element.second); ++it; } +Container::swap(tmp); +``` + +

How `ordered_map` grows its storage in two phases, without copying the values.

+ +The new element is constructed before any value is moved, so `j.emplace("new", std::move(j["old"]))` still works, and +the strong guarantee holds without a `try`, which matters because the library also builds with `-fno-exceptions`. +Parsing `twitter.json` into `ordered_json` needs a third of the allocations and, in the pull request's +measurement, about half the time. A trap on the way: compilers with the EDG front end (Intel's icpc, NVIDIA's nvc++) +consider that pair's move constructor +`noexcept`, so there the vector already "moves", the new path is not taken, and a key copy that throws during growth +calls `std::terminate`. + +### Containers built one element at a time + +The DOM parser used to `push_back` every element into its array, and +insert every member into its object as soon as it was parsed. Now all open arrays share one stack of elements; when +an array of up to 16 elements ends, it is constructed at its exact size from a range of move iterators, one +allocation. `ordered_json` objects collect up to 32 members the same way, with a linear duplicate-key check over that +short slice, and larger objects get a side table of hashes for that check from 64 members on. An `ordered_json` object +with very many members went from 43 million instructions to 1.9 million, and `ordered_json` now parses 1 to 15 % +*faster* than `json` in our suite, since `json`'s `std::map` still allocates a node per member. The binary readers +know their sizes up front and use a separate handler without the stack; sharing it had made them 5 to 12 % slower +with GCC. + +### Smaller ones + +The parser checks for the expected `:` or `,` before it falls into the lexer's general token switch +(−7 % on `citm_catalog.json`, a contribution by [@mvanslobbe](https://github.com/mvanslobbe)), and +[`to_cbor()`](../../api/basic_json/to_cbor.md) no longer +creates a temporary `basic_json` for every object key it writes (−55 % on `twitter.json`, by +[@alexprabhat99](https://github.com/alexprabhat99)). !!! note "The same idea, measured twice" - Moving the key out of the lexer's buffer instead of copying it sounds like a free win. In September, - [#5458][5458] measured it: 3.5 % faster on `citm_catalog.json`, but 1.8 % slower on `jeopardy.json` and 11.9 % - slower on 40,000 short strings, so only string values were moved. In October, with much of the lexer around it - rewritten, [#5855][5855] measured again: `parse()` of `twitter.json` got 3.3 % faster, so keys are moved + The SAX interface hands the lexer's buffer to the handler as `string_t&` and allows it to be moved from; the lexer + starts each token with an empty buffer anyway. In September, moving string values instead of copying them saved + 2 to 3 %. Moving keys too was measured and dropped: the buffer is sized for the longest token so far, keys are + short and values long, so moving a key hands a large buffer to a short string and the next value has to grow a + new one, 11.9 % slower on 40,000 short strings. In October, with much of the lexer around it rewritten, keys were + measured again: `parse()` of `twitter.json` got 3.3 % faster with Clang and 5.0 % with GCC, so keys are moved now too. An idea that lost once is worth measuring again when the code around it changes. -## 5. Read the assembly +## 5 Read the assembly { #theme-5 } -A good part of 3.13.0 came from reading the code the compiler produced for the hot loops, with Clang's -`-Rpass-missed=inline`, profiles, and instruction counts. A few things that turned up: +A good part of 3.13.0 came from reading what the compiler made of the hot loops, with Clang's `-Rpass-missed=inline`, +profiles, and instruction counts. None of the following shows up in the source as a problem. -- **A stack canary on every token** ([#5854][5854]). The function that dispatches on the first byte of a token built - the expected text of `true`, `false` and `null` in local `std::array`s. With `-fstack-protector-strong`, the - default on Ubuntu, any local array gives the whole function a stack canary that is set and checked on every call: - the canary's load alone was 11 % of the function's samples. Now the literal is passed as a string literal with its - length as a template parameter. The same PR replaced the parser's `std::vector` nesting stack, whose - `push_back` GCC called out of line, with `std::vector`. -- **Exceptions that block inlining** ([#5838][5838], [#5840][5840], [#5839][5839]). Building an exception message - inline (`concat(...)`, `create(...)`) made functions like `get_ref`, `operator[]` and the iterator operators too big - to inline. Moving construction and `throw` into never-inlined helpers fixed 27 sites. The same for the lifecycle: - Clang reported about 380 call sites where the copy constructor, the destructor or a comparison was not inlined, - even for a scalar. With the scalar case inline and the rest out of line, `j == 5` went from 3.55 ns to 0.65 ns - with Clang. It is not free: the probe translation unit grew by 13 % at `-O2`, and with GCC, `==` on large - documents got about 7 % slower. -- **Aliasing** ([#5633][5633]). Stores through a `char*` may alias anything, so a write position kept in a member is - reloaded after every store. `json_view`'s writer keeps it in a local variable instead. -- **Inlining that disappears** ([#5878][5878]). Once `dump_escaped()` had grown, GCC 13 and 16 stopped inlining two - small helpers into the pretty-printing loop, and indented output got up to 13 % slower. They are now forced inline. -- **Branches the compiler chose** ([#5908][5908]). `json_document` writes most floats of `canada.json` by - deciding, from the position of the double relative to the token, which of two or three candidate digit strings - to write. The conditions of those `?:` selections depend on the digits, so they are as good as random. Clang - compiled them as conditional moves; GCC 13 compiled them as jumps, and the processor guessed wrong about once per - float (callgrind's branch simulation: 220,000 mispredictions per dump with GCC, 97,000 with Clang). Writing the - selections as bit masks, which no compiler turns into a jump, made the dump of `canada.json` with GCC on x86-64 - about 15 % faster, with 5 % *more* instructions; Clang's code stayed as it was. We found this one while writing - this post. -- **Code size as a cost** ([#5902][5902]). `get>()` used a pack expansion that compiled to one - function of about 28,000 instructions: a thousand inlined copies of the bounds and type checks. A loop needs 49. +### A stack canary on every token + +The function that dispatches on the first byte of a token built the expected text +of `true`, `false` and `null` in local arrays: + +```cpp +case 't': // 3.12.0 +{ + std::array true_literal = {{'t', 'r', 'u', 'e'}}; + return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); +} +``` + +

The 3.12.0 lexer's dispatch for `true`: a local array, and with it a stack canary.

+ +With `-fstack-protector-strong`, which Ubuntu's GCC enables by default and many distributions use for their packages, +*any* local array gives a function a stack canary: the prologue loads a secret (on x86-64 Linux from thread-local +storage) and stores it next to the locals, and every return compares it. That happens on every call, also for the `[`, `,` and `"` tokens that never touch the array; the +canary's load alone was 11 % of the function's samples. (Plain `-fstack-protector` only protects character arrays of +at least 8 bytes, so it didn't trigger here.) Now the literal is a string literal whose length is a template +parameter, compared with one `memcmp` of constant size, and the dispatch has no frame at all: + +```cpp +case 't': return scan_literal("rue", token_type::literal_true); + +template +JSON_HEDLEY_NEVER_INLINE token_type scan_literal(const char (&rest)[N], token_type return_type); +``` + +

The 3.13.0 dispatch: a string literal whose length is a template parameter.

+ +`scan_literal()` is deliberately out of line: inlined, it made Clang's dispatch grow from 233 to 278 instructions, +and slower. Validating `canada.json` got 10.5 % faster with GCC on x86-64. The same change replaced the parser's +`std::vector` nesting stack, whose `push_back` GCC called out of line, with `std::vector`; a bit +vector saves memory that a stack of nesting levels doesn't need. + +### Exceptions that block inlining + +A function that can throw builds the message, allocates the exception, and needs +a landing pad for every temporary, even if the throw never happens: + +```cpp +if (JSON_HEDLEY_LIKELY(ptr != nullptr)) { return *ptr; } // 3.12.0, get_ref() +JSON_THROW(type_error::create(303, detail::concat( + "incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj)); +``` + +

The throw in 3.12.0's `get_ref()`: building the message makes the function too big to inline.

+ +That made [`get_ref()`](../../api/basic_json/get_ref.md), [`operator[]`](../../api/basic_json/operator%5B%5D.md), [`at()`](../../api/basic_json/at.md) and the +iterator operators too big to inline, and gave callers large +frames (192 bytes for `get_ref()` with GCC). 3.13.0 moves construction and `throw` into helpers marked +`[[noreturn]]` and never inlined, so the hot function keeps a test and a call: + +```cpp +if (JSON_HEDLEY_LIKELY(ptr != nullptr)) { return *ptr; } +throw_incompatible_reference_type(obj); // JSON_HEDLEY_NO_RETURN JSON_HEDLEY_NEVER_INLINE +``` + +

The same function in 3.13.0: a test and a call of a helper that is never inlined.

+ +That fixed 27 sites; iterator arithmetic got six times as fast with Clang, and `std::sort` over a `json` array of +10,000 integers in user code 6 to 9 % faster. The value's own lifecycle had the same problem: the destructor, the copy +constructor and [`operator==`](../../api/basic_json/operator_eq.md) contained the code for every type, so they were too big to inline even for a number. Clang +reported about 380 call sites where they were not inlined. Now each starts with an inline test whether the value owns +memory, which Clang compiles to one bit test (`1 << type & 0x10E`), and the rest is out of line. `j == 5` went from 3.55 ns to +0.65 ns with Clang. It is not free: the probe translation unit grew by 13 % at `-O2`, and with GCC, `operator==` on +large documents got about 7 % slower. + +### Aliasing + +C++'s aliasing rules let a `char` lvalue access any object, so a store through a `char` pointer may +modify any object whose address the compiler can't rule out. In a writer that reaches its buffer through a pointer +and keeps its write position in a member, the compiler must assume that `buffer[pos++] = c` can change `pos` itself, +and stores and reloads it around every byte. Keeping the position in a +local variable whose address never escapes puts it in a register: + +```cpp +std::size_t pos = write_buffer_pos; // a local: no char store can reach it +// ... write_buffer[pos++] = digit; ... +write_buffer_pos = pos; // published once at the end +``` + +

Keeping the write position in a local, so that the compiler can keep it in a register.

+ +On a 4 MiB binary value, [`dump()`](../../api/basic_json/dump.md) went from 18.0 ms to 7.4 ms with this change alone. `json_document`'s writer and +the binary writers keep their cursors in locals for the same reason, and publish them before any call that could see +them. + +### Inlining that disappears + +Inlining is a budget per function. Once the string writer had grown, GCC 13 and 16 +stopped inlining two tiny, unchanged helpers into the pretty-printing loop, and indented output got up to 13 % slower. +They are now forced inline. A change in one place silently made an unrelated loop slower; only a benchmark of indented +output noticed. + +### Branches the compiler chose + +[`json_document`](../../api/json_document.md) writes most floats of `canada.json` by deciding, from where the +`double` lies relative to its source text, which of two or three candidate digit strings to write. The conditions of +those selections depend on the digits, so they are as good as random: + +```cpp +const bool up = from > 37 * one; +const bool shorter = biased_distance(from - (up ? 10 * one : 0)) < radius; +const std::uint64_t a = w - r10 + (up ? 10u : 0u); +return shorter ? a : b; +``` + +

Selecting a candidate digit string: GCC 13 compiled the conditional operators as jumps.

+ +Clang compiled the `?:` as conditional moves; GCC 13 compiled them as jumps. With nothing to tell it that the +conditions are unpredictable, a branch that skips some work looks cheaper than computing both sides. [Callgrind](https://valgrind.org/docs/manual/cl-manual.html)'s branch +simulation counted 220,000 mispredictions per dump of `canada.json` with GCC, against 97,000 with Clang. +Written as masks, which have no branch form to reconstruct, the selections stay branch-free with GCC and Clang: + +```cpp +// all ones or zero +std::uint64_t mask_if(bool b) { return std::uint64_t{0} - static_cast(b); } +std::uint64_t select_if(bool b, std::uint64_t a, std::uint64_t c) +{ + return c ^ ((a ^ c) & mask_if(b)); +} + +const bool shorter = biased_distance(from - (mask_if(up) & (10 * one))) < radius; +const std::uint64_t a = w - r10 + (mask_if(up) & 10u); +return select_if(shorter, a, b); +``` + +

The same selections written as masks, which stay branch-free with GCC and Clang.

+ +With GCC on x86-64, the mispredictions went down to 98,000, and the dump of `canada.json` got about 15 % faster with +5 % *more* instructions. Clang's code stayed as it was. We found this one while writing this post. + +### Code size as a cost + +[`get>()`](../../api/basic_json/get.md) used a pack expansion, `{{ j.at(Idx).get()... }}`. A pack +expansion is unrolled before the optimizer decides anything, so Clang emitted one function of about 28,000 +instructions: a thousand inlined copies of the bounds and type checks. It didn't fit in the instruction cache, and its +time moved from 657 to 957 ns just by aligning the code differently. A loop needs 49 instructions. !!! note "Instruction counts, not only time" On the x86-64 machine we used for checking, moving code by a few bytes changed the time of unrelated benchmarks - by up to ±5 %. Many decisions in these PRs were therefore made on instruction counts (callgrind on Linux, - `/usr/bin/time -l` on macOS), checked against timings of builds with all functions and loops aligned to 64 - bytes, and timed interleaved in one binary with several code layouts. The target, applied strictly in the later - PRs, was: at least 3 % faster, and no benchmark more than 1 % slower. Some PRs accepted a small loss elsewhere - and say so, such as the 7 % on GCC's `==` above. + by up to ±5 %. Many decisions were therefore made on instruction counts (callgrind on Linux, `/usr/bin/time -l` on + macOS), checked against timings of builds with all functions and loops aligned to 64 bytes, and timed interleaved + in one binary with several code layouts. The target, applied strictly in the later changes, was: at least 3 % + faster, and no benchmark more than 1 % slower. Some changes accepted a small loss elsewhere and say so, such as + the 7 % on GCC's `operator==` above. The branch example shows the limit of that rule: it is faster with more instructions. -## 6. Write through a cursor +## 6 Write through a cursor { #theme-6 } -In 3.12.0, every `dump()` created its output adapter with `std::make_shared`, and the serializer wrote every -structural character through a virtual call: +In 3.12.0, every [`dump()`](../../api/basic_json/dump.md) created its output adapter with `std::make_shared`, built a 512-character indentation +string, and the serializer wrote every structural character through a virtual call: ```cpp o->write_characters("{\n", 2); @@ -466,7 +842,9 @@ o->write_characters(indent_string.c_str(), new_indent); o->write_character('\"'); ``` -The writing side changed in four steps: +

How the 3.12.0 serializer wrote an object's opening brace and the start of a key: three virtual calls.

+ +The writing side changed in four steps, one per subsection below: ```mermaid flowchart LR @@ -480,25 +858,62 @@ flowchart LR end ``` -

The text serializer's output path before and after [#5285][5285] and [#5449][5449].

+

The text serializer's output path before and after the first two steps.

-1. **A buffer in the serializer** ([#5285][5285]): all writes go into a 1 KiB buffer that is flushed in bulk, so the - virtual call happens once per KiB. -2. **No allocation per call** ([#5449][5449]): the adapter lives on the stack. Together with an indentation string - that [#5285][5285] creates only when needed, a compact `dump()` of a small object went from 4 heap allocations to - 1, the returned string. -3. **Binary writers get a concrete sink** ([#5286][5286]): `to_cbor()` and friends write into a `std::vector` through - a value-type sink, with no virtual call. The same PR replaced `std::reverse` for byte order with - `__builtin_bswap*`, after finding that Clang had emitted no `bswap` instruction at all in the CBOR number path. -4. **A cursor instead of `vector::insert()`** ([#5824][5824], [#5885][5885]). After step 3, writing an array of - integers as CBOR was still no faster than in 3.12.0, and slower with GCC. The profile said why: each number's - one to eight bytes were appended with `vector::insert()`, an out-of-line insert-anywhere routine, which took 30 % - of the time. The sink now reserves space ahead and writes through a pointer, and runs of numbers are encoded in a - loop without a call per element. +### A buffer in the serializer -The last step also took the branches out of encoding an integer. The size of each integer in a stream is hard to -predict, so the encoder looks the size class up from the number of leading zero bits and stores the head as one byte -plus one 8-byte word, of which the caller keeps only as many bytes as the class needs: +All writes go into a 1 KiB buffer that is flushed in bulk, so the virtual call happens once per KiB, and neighboring +writes can be merged. Runs longer than the buffer are written straight through, so they are not copied twice. + +```cpp +void put_char(char c) +{ + if (JSON_HEDLEY_UNLIKELY(write_buffer_pos == write_buffer.size())) { flush(); } // virtual + write_buffer[write_buffer_pos++] = c; +} +``` + +

Writing one character: the virtual call happens only when the buffer is full.

+ +### No allocation per call + +The adapter lives on the stack, and the indentation string is created only when it is needed. A compact `dump()` of a +small object went from 4 heap allocations to 1, the returned string. + +### A concrete sink for the binary writers + +[`to_cbor()`](../../api/basic_json/to_cbor.md) and friends are templates over the sink type and write into a `std::vector` with no +virtual call. Byte order is now swapped with `__builtin_bswap*` (or `_byteswap_*` with MSVC) instead of `std::reverse` +on a byte array: compilers can recognize the reversal as a byte swap in a small function, but in the CBOR number path, +Clang emitted no `bswap` at all. + +### A cursor instead of `vector::insert()` + +After the previous step, writing an array of integers as CBOR was still no faster than in 3.12.0, and slower with GCC. +The profile said why: each number's one to eight bytes were appended with `vector::insert()`, which both standard +libraries implement as an out-of-line insert-anywhere routine; it took 30 % of the time, more than encoding the +numbers. The sink now keeps a cursor and a limit pointer, reserves space for a whole run of numbers at once, and writes +through the cursor: + +```cpp +CharType* const start = oa.reserve(max_run * integer_encoding_space); // one check per run +CharType* out = start; +for (n = 0; n < max_run && it != end && it->is_number_integer(); ++n, ++it) +{ + out += encode_integer(out, *it); +} +oa.commit(out - start); +``` + +

Encoding a run of integers through a cursor, with one capacity check for the whole run.

+ +### Integers without branches + +The last step also took the branches out of encoding an integer. After the bounds checks, mispredicted branches +accounted for about 40 % of the remaining time: the type, the sign and the 1-, 2-, 4- or 8-byte size class of each integer in a stream are +hard to predict. The encoder reads signed and unsigned integers through one masked path, looks the size class up from +the number of leading zero bits, and stores the head as one byte plus one 8-byte word, of which the caller keeps only +as many bytes as the class needs: ```cpp // 1, 2, 3 or 4 if x fits 1, 2, 4 or 8 bytes, without a branch @@ -513,74 +928,118 @@ std::size_t encode_first_byte_and_tail(CharType* out, std::uint8_t first_byte, { out[0] = to_char_type(first_byte); const unsigned unused_bits = 64u - ((8u << size_class) >> 1u); - const std::uint64_t tail = is_little_endian ? byteswap(value) >> unused_bits : value << unused_bits; - std::memcpy(out + 1, &tail, sizeof(tail)); // always 8 bytes; the caller keeps the first 0, 1, 2, 4 or 8 + const std::uint64_t tail = is_little_endian ? byteswap(value) >> unused_bits + : value << unused_bits; + // always 8 bytes; the caller keeps the first 0, 1, 2, 4 or 8 + std::memcpy(out + 1, &tail, sizeof(tail)); return ((std::size_t{1} << size_class) >> 1u) + 1; } ``` -Against 3.12.0, writing an array of small signed integers as CBOR went from 0.97× to 4.19× with Clang on an M1 Max, -and from 0.94× to 2.77× with GCC 13 on x86-64 ([#5824][5824]). +

Encoding the head of a CBOR integer without a branch: the size class from a table, the tail as one 8-byte store.

-## 7. Fix the algorithm first +The table is a table because Clang vectorized the equivalent comparisons into slower code, and the unconditional +8-byte store is why `reserve()` asks for 9 bytes per integer. Writing an array of small signed integers as CBOR, +which had not got faster before, is now 4.2 times as fast as with 3.12.0 with Clang on an M1 Max, and 2.8 times with +GCC 13 on x86-64. One more +lesson from these changes: the loop over an array is a separate function that is never inlined. Inlined into the +function that writes any value, its register needs made every call of that function save more registers, once per +nested value, which cost `citm_catalog.json` 13 %. -None of the micro-optimizations above matter much next to an algorithm that is quadratic. These are the ones found and -fixed in this release cycle, measured on the same machine: +## 7 Fix the algorithm first { #theme-7 } -| operation | 3.12.0 | 3.13.0 | speedup | cause | PR | -| --- | --: | --: | --: | --- | --- | -| `diff()` of an array of 64,000 numbers against an empty array | 4,102 ms | 9.98 ms | 411× | each `remove` was inserted at the front of the patch | [#5461][5461] | -| `diff()` of an array of 20,000 objects against every second one of them | 119 ms | 3.85 ms | 31× | the same | [#5461][5461] | -| `parse()` with a callback that rejects half of 32,000 objects | 1,334 ms | 11.5 ms | 116× | each rejected value was searched for from the start of its parent | [#5457][5457] | -| `<` on two equal values nested 24 levels deep (C++11 to C++17) | 62.6 ms | 0.002 ms | exponential | `std::vector`'s `<` asks `a < b` and `b < a`, and both recurse | [#5390][5390] | -| `<` on `citm_catalog.json` and a copy, 10× (C++11 to C++17) | 274 ms | 3.81 ms | 72× | the same | [#5390][5390] | -| `flatten()` of `citm_catalog.json` as `ordered_json` | 253 ms | 1.37 ms | 184× | every new key was looked up linearly | [#5834][5834] | -| `to_bson()` of a value nested 200 levels deep, 100× | 19.5 ms | 0.566 ms | 34× | each document's size was computed by walking everything below it again | [#5553][5553] | -| 100,000 × `push_back()` on an `ordered_json` with `JSON_DIAGNOSTICS` | 1,514 ms | 4.98 ms | 304× | every insert re-pointed the parent pointers of all elements | [#5832][5832] | -| 10,000 × `at(i)` on an `ordered_json` array with `JSON_DIAGNOSTICS` | 43.2 ms | 0.081 ms | 533× | the same | [#5832][5832] | - -

Operations that were quadratic or worse in 3.12.0, timed with both versions (C++17, `-O3`, median of 3 interleaved runs).

+None of the micro-optimizations above matter much next to an algorithm that is quadratic. Seven operations were +quadratic or worse in 3.12.0. They are fixes of cases most programs never hit, not tuning, so they are not part of the +2.9× above (except `flatten()`, which the suite happens to measure); [Appendix D](#d-algorithmic-fixes) has the +numbers:
--8<-- "images/perf_blog_cliffs.svg"
-

The times of the table above on a logarithmic scale; each arrow leads from the time with 3.12.0 to the time with 3.13.0. Less is better.

+

Operations that were quadratic or worse in 3.12.0, on a logarithmic scale; each arrow leads from the time with 3.12.0 to the time with 3.13.0. Less is better.

-The `<` case matters to anyone who keeps `json` values in a `std::set`, uses them as `std::map` keys, or sorts them -before C++20. Each level of nesting doubled the work: two equal values nested 30 levels deep took 3.8 seconds to -compare in [#5390][5390]'s measurement, and nothing about such a value is unusual. Since C++20, `<` is derived from -`<=>`, which asks once. +### Comparing in one pass -The other side of this theme is recursion. A value nested 100,000 levels deep used to crash `dump()`, the copy -constructor, `==`, `hash`, `diff()`, `flatten()` and the binary writers with a stack overflow. The obvious fix, -making every walk iterative, measured 2 % to 20 % slower on ordinary documents ([#5285][5285]), 3 % to 9 % for -copying ([#5389][5389]), and 10 % to 14 % for merging ([#5547][5547]). RapidJSON keeps recursion as its default for -the same reason. 3.13.0 therefore bounds the recursion instead: the first 128 levels run the old recursive code, and -only below that does an explicit stack take over. A document nested less deeply pays only for counting the levels. +The most instructive one is [`operator<`](../../api/basic_json/operator_lt.md). Before C++20, `json`'s `operator<` on two arrays or +objects called the `operator<` of `std::vector` or `std::map`, which is `std::lexicographical_compare`. For every pair of elements it asks `a < b` and, +if that is false, `b < a`. When the elements are themselves containers, both questions recurse into the whole +subtree, and when they are equal, both have to go all the way down. So each level of nesting doubles the work: two +equal values nested 20 levels deep took 5.7 ms, 30 levels 3.8 seconds, and 40 levels would take about an hour. That +matters to anyone who keeps `json` values in a `std::set`, uses them as `std::map` keys, or sorts them. Since C++20, +`operator<` is derived from [`operator<=>`](../../api/basic_json/operator_spaceship.md), which asks once and was never affected. -Destruction got its own trick ([#5762][5762]). Instead of a heap-allocated stack, the destructor uses pointer -reversal, the idea behind the Schorr-Waite graph marking algorithm: while it empties a container, that container's -last child slot stores the link back to its parent. Destroying any value now allocates nothing and never recurses. -Against 3.12.0, destroying a parsed document is 1.25 to 1.56 times as fast in our suite, and destroying an array of -one million small objects 1.39 times (125 ms to 90 ms). +3.13.0 compares in one pass over an explicit stack of iterator pairs and gets "less", "equal", "greater" or +"unordered" for each pair at once, so the ordering question is asked once per element. Two subtleties were found by +comparing 68,121 results with the old code, not by reading it. `std::lexicographical_compare` steps over a pair it +cannot order (a NaN) and goes on, while the three-way version stops there, so the pass has a flag for which behavior +the caller needs. And object keys must be compared with `operator==` when testing equality, not with the object's comparator: +for `ordered_json`, that comparator is `std::equal_to`, and using it as "less" reports every equal key as smaller. The +single pass has a price: ordering flat arrays of numbers got 27 % slower, while flat objects got 34 % faster. -## 8. Build a different data structure +### Bounded recursion -After all of the above, `json::parse()` is still bound by what it builds: one heap allocation per string, array and -object, and a `std::map` node per member. Many programs only parse a document, read some fields and throw it away. -For them, 3.13.0 adds [`json_document`](../../features/json_view.md) and `json_view` in a new header, -``. The two figures below show what each parser makes of this 54-byte text: +The other side of this theme is depth. A value nested 100,000 levels deep used to crash `dump()`, the copy +constructor, `operator==`, `std::hash`, [`diff()`](../../api/basic_json/diff.md), [`flatten()`](../../api/basic_json/flatten.md) and the binary writers with a stack overflow, and +servers that copy JSON from clients hit that. Other libraries limit the depth of what they parse ([Boost.JSON](https://github.com/boostorg/json) at 32, +[serde_json](https://github.com/serde-rs/json) at 128, [simdjson](https://github.com/simdjson/simdjson) at 1024) or +work iteratively everywhere ([yyjson](https://github.com/ibireme/yyjson)). Making every walk iterative made `dump()`, +copying and merging 2 to 20 % slower on ordinary documents; [RapidJSON](https://github.com/Tencent/rapidjson) +keeps recursion as its default for the same +reason. So 3.13.0 bounds the recursion instead: + +```cpp +constexpr std::size_t recursion_depth_limit() noexcept { return 128; } + +static void destroy_bounded(basic_json& v, std::size_t depth) noexcept +{ + if (JSON_HEDLEY_UNLIKELY(depth >= detail::recursion_depth_limit())) + { + destroy_walk(v); // deeper than 128 levels: no recursion at all (below) + return; + } + // for each child that is a container: destroy_bounded(child, depth + 1) + free_container(v); +} +``` + +

Bounded recursion: recursive down to 128 levels, iterative below.

+ +The first 128 levels run the old recursive code, and only below that does an explicit stack, or the walk below, take +over. A document nested less deeply pays one comparison per container. Copying and comparing have fixed signatures and +can't take a depth argument, so they count the levels in a `thread_local` counter, about ten nanoseconds per copied +container. + +### Destroying without a stack + +The destructor's walk for deep values uses pointer reversal, the idea behind the +[Schorr-Waite graph marking algorithm](https://doi.org/10.1145/363534.363554): while it empties a container, the slot of that container's last child holds the +link back to the container's parent, so the way back needs no memory ([Appendix I](#i-details-of-the-themes) shows the +loop). The walk allocates nothing and calls nothing that can throw, which fixed two older bugs: the previous +destructor flattened children into a `std::vector`, which ignored the allocator type and could let `std::bad_alloc` +escape from a `noexcept` destructor. A test checks with a counting allocator that destroying any value allocates +nothing. Against 3.12.0, destroying a parsed document is +1.25 to 1.56 times as fast in our suite, and destroying an array of one million small objects 1.39 times. + +## 8 Build a different data structure { #theme-8 } + +After all of the above, [`json::parse()`](../../api/basic_json/parse.md) is still bound by what it builds: one heap allocation per string, array and +object, and a `std::map` node per member, all of which have to be freed again. Many programs only parse a document, +read some fields and throw it away, or change a few values and write it back. For them, 3.13.0 adds +[`json_document`](../../features/json_view.md) and `json_view` in a new header, ``. The two +figures below show what each parser makes of this 54-byte text: ```json {"port": 6379, "price": 19.90, "tags": ["eu", "a\"b"]} ``` +

The example text of the next two figures.

+
--8<-- "images/json_view_layout_tree.svg"
-

What `json::parse()` builds: a tree in which every object, array and string is a separate heap allocation (dashed). The float is converted to a `double` while parsing, so the original text `19.90` is gone.

+

What `json::parse()` builds: a tree in which every object, array and string is a separate heap allocation (dashed). The float is converted to the nearest `double` while parsing, so the original text `19.90` is gone: the stored value is 19.899999999999998578…, which `dump()` writes as `19.9`, the shortest text that reads back as the same `double`.

--8<-- "images/json_view_layout_index.svg" @@ -588,250 +1047,287 @@ For them, 3.13.0 adds [`json_document`](../../features/json_view.md) and `json_v

What `json_document::parse()` builds from the same text: one flat index of nine 16-byte nodes in document order, which point back into the source text, plus a buffer for the one string with an escape. A `json_view` is two pointers, here to the array.

+### One flat index -The design is not ours either. simdjson's tape and yyjson's immutable document are both flat arrays of fixed-size -entries in document order instead of trees of separate allocations, and yyjson's entries are 16 bytes, too. What -`json_document` does: +The design is not ours either. [simdjson's tape](https://github.com/simdjson/simdjson/blob/master/doc/tape.md) and +[yyjson](https://github.com/ibireme/yyjson)'s immutable document are both flat arrays of fixed-size +entries in document order instead of trees of separate allocations, and yyjson's entries are 16 bytes, too. Ours: -- **One 16-byte node per value and per key, in document order** ([#5620][5620]). Strings stay in the input; only - strings with escapes are decoded into an arena. Integers are converted while their digits are in the cache. A - container stores the size of its subtree, so a reader can step over it in constant time. A document makes a - handful of allocations, however many values it has. -- **Floats stay text until you read them.** The parser records where the integer digits, fraction and exponent are, - and converts on access with the same Clinger/Eisel-Lemire code as `json::parse`. We prototyped converting them - during the parse and dropped it ([#5908][5908]): reading every number of `canada.json` got 4 to 7 % faster, but - parsing it 36 to 90 % slower. -- **SIMD where the baseline has it** ([#5628][5628]): strings scanned 16 bytes at a time with SSE2 or NEON, and - non-ASCII text validated with simdjson's lookup4 check. `\u` escapes are decoded with a table, as yyjson's - `read_hex_u16` does. -- **A hash index for big objects** ([#5628][5628]): an object with 128 or more members gets an open-addressing - table after parsing, an idea from Boost.JSON. Looking up every key of a 10,000-member object went from 59.8 ms to - 0.16 ms. The hash is not seeded, so the probe length is capped; if crafted keys exceed the cap, that object falls - back to a linear search, and parsing can't become quadratic. -- **First duplicate wins.** Lookups return the first of duplicate keys, as yyjson and simdjson do, because - returning the last one meant scanning every object to its end and made lookups in small objects 1.6 to 3.4 times - slower ([#5622][5622]). +```cpp +struct node +{ + node_kind kind; // object = 1, array = 2, string, number, ... + std::uint8_t flags; // escaped, edited, moved, ... + std::uint16_t extra; // numbers: digits before and after the point; big objects: hash index + std::uint32_t off; // where the value starts in the source text (or in the arena) + std::uint32_t len; // strings and float tokens: bytes; containers: number of elements + std::uint32_t next; // containers: number of nodes in the subtree, including this one +}; +static_assert(sizeof(node) == 16, "node must stay 16 bytes"); +``` -### How it compares +

A node of `json_document`'s index: 16 bytes for every value.

-We compared `json_document` with eleven other engines. In C++: yyjson 0.13.0, simdjson 4.6.11 (its DOM and its -On-Demand API), sonic-cpp 1.0.2, RapidJSON (master, 24b5e7a), Glaze 9.0.0 (its `generic_u64` DOM, its `lazy_json`, -and reading straight into structs), and Boost.JSON (1.92 on the Mac, 1.83 on x86-64). In Rust: sonic-rs 0.5.10, simd-json 0.19.0 and serde_json -1.0.154. Plus `json::parse`. Before anything is timed, every engine must report the same number of values, the same -number of string bytes, and a bit-identical sum of all numbers in document order. That means every engine converts -every number exactly; RapidJSON guarantees that only with `kParseFullPrecisionFlag`, so that is what it runs with -(with its default flags it happened to produce the same values for these files, and those rows are in the data). +- **Skipping is an addition.** A container stores the size of its subtree, so the value after it is + `n + (is_container(*n) ? n->next : 1)`, and the members of an object are a key node followed by the value's + subtree. There are no pointers in the index; the parser fills in `next` when the container closes. `is_container()` + is a single subtraction and comparison, `kind - 1u <= 1u`, which is why objects and arrays are numbered 1 and 2. +- **Strings stay in the input.** Only strings with escapes are decoded, into an arena. A document makes a handful of + allocations, however many values it has. The price is that the text must outlive the document, unless you let the + document own a copy ([`parse_copy()`](../../api/basic_json_document/parse_copy.md), or an rvalue `std::string`). + Offsets are 32 bits, which limits a document to 4 GiB. +- **Integers are converted while their digits are in the cache,** into the last 8 bytes of their node. +- **Floats stay text until you read them.** The node records the number of digits before and after the point, and + reading converts with the same Clinger/Eisel-Lemire code as `json::parse`. Converting them during the parse was + tried and dropped: reading every number of `canada.json` got 4 to 7 % faster, but parsing it 36 to 90 % slower. A + default `dump()` writes the shortest form of a float, as `json` does; [`number_format::source`](../../api/basic_json_view/number_format.md) copies the source + text of every number instead. +- **SIMD and tables** as in theme 2, and `\u` escapes decoded with a table, as yyjson's `read_hex_u16` does. +- **A hash index for big objects,** an idea from [Boost.JSON](https://github.com/boostorg/json). An object with 128 or more members gets an open-addressing + table after parsing; looking up every key of a 10,000-member object went from 59.8 ms to 0.16 ms. The hash is not + seeded, so crafted keys could make building the table quadratic. Probing is therefore capped at 64 slots: a key that + would need more drops the table, and that one object falls back to a linear search. Neither parsing nor lookups can + become quadratic. +- **First duplicate wins.** Lookups return the first of duplicate keys, as yyjson and simdjson do, because returning + the last one meant scanning every object to its end and made lookups in small objects 1.6 to 3.4 times slower. + `json::parse()` keeps the last one, so for a text with duplicate keys, the two can disagree; the documentation + says so. -The workloads: *parse* (build the document and free it), *traverse* (parse, then visit every value and convert every -number), *select* (parse, then read a few fields of every record), *parse+dump*, and *dump* (write a document that -was parsed beforehand; only the writing is timed). We ran them on the M1 Max with -Apple clang 21 (and Rust 1.99), and on the x86-64 Haswell server with GCC 13 and Clang 18 (`-march=haswell`, one -pinned core). That server has other work running, so differences of a few percent there are noise. Glaze 9 could -not be built with Clang 18 on it (Clang 18 can't use GCC 13's `std::expected`), and the Rust engines ran on the Mac -only. +### It can be edited, too -Parse times in µs on the M1 Max, a fresh document each time (C++23 and Rust `--release`, `-O3`, best of 30 -interleaved rounds): +A read-only index is the easy case, and a fair objection is that `json_document` is only +fast because it can't change. [`json_editable_document`](../../features/json_view.md#editing-a-document) has `set()`, +`insert()`, `erase()` and `push_back()`. An edit never writes into the source text and never moves the parsed index: -| engine | `twitter.json` (632 KB) | `citm_catalog.json` (1.7 MB) | `canada.json` (2.3 MB) | `jeopardy.json` (56 MB) | -| --- | --: | --: | --: | --: | -| nlohmann/json `json_document` | **183** | **364** | **943** | **22,681** | -| yyjson | 194 | 478 | 1,489 | 30,342 | -| simdjson DOM | 202 | 486 | 2,097 | 26,904 | -| sonic-rs (Rust) | 302 | 664 | 1,907 | 30,202 | -| sonic-cpp | 379 | 986 | 2,580 | 40,804 | -| simd-json (Rust, input copy included) | 567 | 1,616 | 4,939 | 59,364 | -| Boost.JSON | 868 | 1,483 | 2,481 | 88,925 | -| RapidJSON | 1,183 | 1,613 | 7,358 | 143,044 | -| serde_json (Rust) | 1,202 | 2,337 | 6,836 | 139,829 | -| Glaze `generic_u64` | 1,268 | 2,727 | 9,262 | 132,273 | -| nlohmann/json `json::parse` | 1,352 | 2,386 | 5,915 | 163,750 | +- a new scalar is written over its own node, with new string and number text in an append-only arena; +- new arrays and objects are allocated in chunks of nodes that never move; +- a container whose elements change is marked as moved and gets a separate list of its entries: links to the values, + which stay where they are. The list doubles when it grows, so `push_back()` is amortized constant. -

Parse times in µs, less is better: a fresh document per call, built and freed, on an Apple M1 Max. The fastest engine of each file is in bold.

+Views stay valid across edits, because values never move. Reading an edited container costs one flag test per +container and one test per element for a link; the link case is out of line, so that it compiles to a predicted +branch rather than a conditional select that would delay the following loads. A read-only document doesn't carry any +of this; an editable one that hasn't been edited reads within a few percent of it. And because untouched values keep +their source text, [`dump()`](../../api/basic_json_view/dump.md) with +`number_format::source` writes back a patched configuration file with its member order +and the spelling of every number (`19.90`) intact, which `json` (sorted keys) and `ordered_json` (`19.9`) can't. -
---8<-- "images/perf_blog_view.svg" -
+The limits are documented: `set()` of a new key searches the object's members, so building a large object key by key +is quadratic, as with `ordered_json`, and an object that was edited loses its hash index and is searched linearly. +[How it compares](#how-it-compares) times the editable document against the mutable trees of other libraries. -

The parse times of the table above as throughput (file size divided by time), more is better. RapidJSON, Glaze, serde_json and simd-json are left out to keep the chart readable; they are in the table.

+## How it compares -Writing, with each document parsed beforehand, so that only the writing of compact JSON into a new string is timed. -Before anything is timed, every output must read back as the same values, with bit-identical numbers, so every -engine writes every float exactly: +"Which JSON library parses fastest?" has no answer, because "parsing" means different things in different libraries. +Some build a tree you can change, some a read-only index, some nothing at all. So we compare **use cases** instead: +tasks a program actually has, each of which every library may solve in whatever way it does best. -| engine | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | -| --- | --: | --: | --: | --: | -| nlohmann/json `json_document` | **74.5** | **133** | **1,625** | **14,757** | -| yyjson | 104 | 166 | 1,716 | 20,134 | -| sonic-cpp | 105 | 222 | 3,044 | 19,836 | -| Glaze `generic_u64` | 208 | 469 | 1,700 | 34,367 | -| sonic-rs (Rust) | 213 | 444 | 2,417 | 33,818 | -| nlohmann/json `json::dump` | 217 | 286 | 2,244 | 31,205 | -| serde_json (Rust) | 329 | 487 | 2,236 | 52,629 | -| simdjson DOM | 354 | 498 | 6,816 | 54,833 | -| simd-json (Rust) | 358 | 473 | 2,707 | 47,998 | -| Boost.JSON | 498 | 501 | 2,942 | 63,392 | -| RapidJSON | 592 | 815 | 6,999 | 83,397 | +### Four ways to hold a JSON text -

Write times in µs, less is better: compact output of a document parsed beforehand, on an Apple M1 Max, best of 2 × 30 interleaved rounds (2 × 6 for `jeopardy.json`). The fastest engine of each file is in bold. Boost.JSON writes some floats of `canada.json` with more digits, so its output is 9 % larger.

- -
---8<-- "images/perf_blog_view_dump.svg" -
- -

The write times of the table above as throughput (size of the compact output divided by time), more is better, for the engines of the parse chart.

- -On the Mac, `json_document` writes fastest on every file, 1.05 to 1.40 times ahead of the next engine. Part of that is its -design, not the writer: a string that had no escape sequence in the source has nothing to escape, so it is copied -from the source text without being scanned, and integers are copied as their source text. Floats are formatted -anew with Żmij (theme 3), and since `json_document` keeps floats as text, a float of more than 15 significant digits -is first converted from its digits to a `double`. That is why `canada.json` is the closest race on the Mac (Glaze -takes 1.05 times as long, yyjson 1.06) and is lost on x86-64, where yyjson takes 0.95 (GCC) and 0.91 (Clang) of -`json_document`'s time. With GCC it was 0.78, and even `json::dump()`, which has the `double`s already, was -faster, until the change described in [theme 5](#5-read-the-assembly). - - -The fastest *other* engine for each workload, as its time divided by nlohmann/json's `json_document`'s, over the -four files above: above 1, `json_document` is ahead; below 1, it is behind. - -| workload | M1 Max, Apple clang 21 | x86-64, GCC 13 | x86-64, Clang 18 | +| approach | what you get | what it costs | libraries we measured | | --- | --- | --- | --- | -| parse | 1.06–1.58 (yyjson, simdjson DOM) | 0.97–1.01 (simdjson DOM) on `twitter`, `citm_catalog`; 1.89 on `canada`; **0.71** (sonic-cpp) on `jeopardy` | 0.96–0.97 (simdjson DOM) on `twitter`, `citm_catalog`; 1.21–1.56 on `canada`, `jeopardy` | -| traverse | 1.04–1.18 (yyjson, simdjson On-Demand) | **0.58–0.86** (simdjson On-Demand) | **0.86**–1.20 (sonic-cpp, simdjson On-Demand, yyjson) | -| select | **0.34–0.84** (Glaze structs, simdjson On-Demand) | **0.26–0.65** | **0.33–0.86** | -| parse+dump | 1.18–1.35 (yyjson) | 1.20–1.52 (yyjson, sonic-cpp) | 1.16–1.27 (yyjson, sonic-cpp) | -| dump | 1.05–1.40 (yyjson, Glaze, sonic-cpp) | 1.23–1.34 (yyjson) on `twitter`, `citm_catalog`; **0.95** (yyjson) on `canada`; 0.99 (yyjson) on `jeopardy` | 1.28–1.33 (yyjson) on `twitter`, `citm_catalog`; **0.91** (yyjson) on `canada`; **0.95** (sonic-cpp) on `jeopardy` | +| **mutable tree** | a value per JSON value, every string and number converted and owned; change anything | an allocation per container and often per string, all freed again | nlohmann/json `json`, [Boost.JSON](https://github.com/boostorg/json), [RapidJSON](https://github.com/Tencent/rapidjson), [sonic-cpp](https://github.com/bytedance/sonic-cpp), [Glaze](https://github.com/stephenberry/glaze) `generic`, [yyjson](https://github.com/ibireme/yyjson)'s mutable document; [serde_json](https://github.com/serde-rs/json), [sonic-rs](https://github.com/cloudwego/sonic-rs), [simd-json](https://github.com/simd-lite/simd-json) values | +| **flat document** | one array of fixed-size entries in document order; read in any order, many times | a few allocations; read-only, or extra bookkeeping to edit | nlohmann/json `json_document` (editable as `json_editable_document`), yyjson, [simdjson](https://github.com/simdjson/simdjson) DOM | +| **forward-only reading** | each value once, in document order: events (SAX) or a cursor | nothing is built; you can't go back | nlohmann/json [`sax_parse`](../../api/basic_json/sax_parse.md), RapidJSON `Reader`, Boost.JSON `basic_parser`, simdjson On-Demand, Glaze `lazy_json`; serde visitors in Rust | +| **into your own types** | the fields you declared, nothing else | a struct per document shape; other fields are skipped | Glaze reading into structs, serde with `derive`, nlohmann/json `from_json()` from `json` or from a view | -

Time of the fastest other engine divided by the time of nlohmann/json's `json_document`, as a range over the four files, with the engines that were fastest; below 1, nlohmann/json is behind.

+

The kinds of representation the libraries in this comparison offer. Most libraries offer more than one.

-So, is it the fastest JSON parser? Not in general. Among the parsers that build a document you can read in any -order, it is the fastest at parsing and writing back in every configuration we ran, and the fastest at parsing on -Apple silicon. On x86-64 it ties with simdjson's DOM on typical documents. Where it loses: +Which approach wins depends on the task, and a comparison of "parse" times across the rows of this table compares +different amounts of work. In nlohmann/json, `json` is the mutable tree and `json_document` the flat document, so we +show the library twice: its best way *with* `json_document` and its best way *without* it. -- **Reading a few known fields.** simdjson's On-Demand API builds nothing and reads forward only; Glaze reading into - structs that declare just the needed fields skips everything else without building it. Both are faster for - *select*, Glaze by up to 3.8× on `canada.json`, where it skips the coordinates. -- **One pass over everything on x86-64 with GCC.** simdjson On-Demand visits every value in 0.58 to 0.86 of the time. -- **Fresh large documents on Linux.** A fresh 56 MB `jeopardy.json` pays for the page faults of a new index of - 3.25 million 16-byte nodes (52 MB). With GCC, sonic-cpp parses it in 0.71 of the time. Reusing the document (`read()`) halves `json_document`'s time - there, and then it is ahead of a reused simdjson parser (0.53 against 0.61 of the fresh time). -- **Float-heavy documents, measured fairly.** `json_document` converts a float when you read it; the others convert - while parsing. The `canada.json` parse row flatters it; *traverse* is the fair comparison, and there it is - 1.04× ahead on the Mac and behind sonic-cpp with Clang on x86-64 (0.88). -- **Writing floats on x86-64.** Writing a document it parsed beforehand, `json_document` is behind yyjson on - `canada.json` (0.95 with GCC, 0.91 with Clang), because it first converts most floats from their text, and ties - on `jeopardy.json` (0.95 to 0.99). -- **Small documents.** On a 2.5 KB message, all document parsers take about a microsecond, and yyjson and - simdjson's DOM are as fast or a few percent faster. +### Six use cases -And `json::parse`? Boost.JSON builds a mutable tree as `json` does, so it is the fair comparison. It is 1.6 to 2.4 -times as fast on the Mac, and 2.4 to 4.5 times on the x86-64 server. For writing, the comparison goes the other way: -`json::dump()` writes 1.3 to 2.3 times as fast as Boost.JSON's `serialize()` on the Mac. On the x86-64 server it is -1.1 to 1.6 times as fast on three files, but Boost.JSON writes `jeopardy.json` 4 % (Clang) to 12 % (GCC) faster. On the Mac it is also ahead of RapidJSON, simdjson's DOM and simd-json on every file, and of sonic-rs and -serde_json on all but one file each, where they are within 2 %. +Each starts from the file's text in a `std::string` (or a byte slice in Rust) and ends with everything the library +built freed again: -The programs are in -[`tests/benchmarks/json_view/others`](https://github.com/nlohmann/json/tree/develop/tests/benchmarks/json_view/others), -with the pinned versions and checksums of every library. +- **validate:** is this text valid JSON? Nothing is kept, so this measures the parser alone, as in a server that + checks a request before it passes it on. +- **sum:** visit every value in document order, convert every number, and add them up. This measures walking a whole + document and converting all of its numbers. +- **select:** read a few fields of every record, such as the id, the user name and the retweet count of every tweet, + as a program does that needs only part of a response. A library that reads lazily can skip the rest. +- **edit:** change a value, remove a member and add a member in every record, then write the result as compact JSON: + the round trip of a program that patches a message or a configuration. +- **minify:** read the text and write it as compact JSON, without whitespace. This measures reading and writing + together, without changes in between. +- **write:** write a document that was parsed beforehand as compact JSON; only the writing is timed. + +Each use case runs on each of the four test files, and each library may solve it in every way it offers: in place, +with a SAX handler, into structs, with a parser that is reused (measured, but not chosen). Before anything is timed, +every way's result is checked: the same values, the same string bytes, the same sum of all numbers to the last bit, +and an output that reads back as the expected document. The +[README of the programs](https://github.com/nlohmann/json/tree/develop/tests/benchmarks/json_view/others) lists every +way, the fields and edits per file, and the checks. + +### Where the input comes from + +Starting from a string in memory is how most JSON benchmarks work: it measures the library, not the disk +or the operating system. It is not neutral in every detail, though: + +- The string has 64 bytes of spare capacity, so simdjson, which reads up to 64 bytes past the end, can use it without + a copy. A program would load the file into such a buffer in the first place. +- yyjson, RapidJSON and simd-json can parse in place, which needs a buffer they may change. They get a copy, and the + copy is part of their time: 10 to 30 µs for `twitter.json` on the Mac. Even so, yyjson's in-place parse is about + as fast as its parse without a copy, which is measured too. +- `json_document` reads the string in place and keeps pointing into it. A document that owns its text + ([`parse_copy()`](../../api/basic_json_document/parse_copy.md)) costs one copy more. +- Reading from files and streams is not part of the comparison. + +### Checking less, on purpose + +Some libraries can skip parts of the validation, and that is often why they are fast. A +lazy reader such as simdjson's On-Demand API or Glaze's `lazy_json` only looks at what you ask for; to step over the +rest, it matches brackets without looking inside, so reading a few fields of a large record costs little more than +finding them. A minifier only needs to find whitespace, not understand the values. Skipping the UTF-8 check is +RapidJSON's default and sonic-cpp's too. Each is a good choice for input that is known to be valid, for example text +your own program wrote a moment ago. To tell these ways apart, every way is also fed three broken inputs: the file cut +short by one byte, a stray comma, and an invalid UTF-8 byte in a string. A way that rejects all three validates fully, +and each cell shows the fastest such way. If a way that checks less is faster, it is shown in the right half of the +cell: "U" trusts UTF-8, "P" reads lazily or only removes whitespace. + +
+--8<-- "images/perf_blog_usecases_mac.svg" +
+ +

Time per library and use case on an Apple M1 Max: each library's fastest fully validating way, as the geometric mean over `twitter.json`, `citm_catalog.json`, `canada.json` and `jeopardy.json`, relative to the fastest library, so that every file counts equally. Less is better. Where a way that checks less is at least 3 % faster, it is shown in the right half of the cell: "U" trusts UTF-8, "P" reads lazily or only removes whitespace. "n/a" means the library has no API for the use case. Hover over or tap a cell for the times per file and the way; the tables are in [Appendix E](#e-comparison-with-other-libraries).

+ +### Results on the Mac + +On the Apple M1 Max, `json_document` is the fastest library that validates fully in all six use cases, and yyjson is +second in every column. That includes editing, where the editable document is faster than yyjson's mutable document: +the speed doesn't depend on being read-only. + +Some caveats belong next to that: + +- **The lead is not the same on every file.** On `twitter.json`, yyjson is within a few percent in *validate*, *sum* + and *select*. Most of the lead comes from the indentation of `citm_catalog.json`, the floats of `canada.json` (next + point) and the size of `jeopardy.json`. +- **Floats are converted only when read.** That helps `json_document` in *validate* and *select* on `canada.json`, + where the others convert 111,080 floats nobody looks at. *sum* reads every number, so it is the fair comparison for + floats; there, `json_document` is still slightly ahead of yyjson. +- **Number text can be copied.** With [`number_format::source`](../../api/basic_json_view/number_format.md), `json_document` writes each number by copying its text + instead of formatting it, and RapidJSON can read numbers as strings and write them back unchanged. That would make + writing `canada.json` with `json_document` four times as fast. The figures use neither: every library formats the + numbers it converted. +- **Small documents.** On a 2.5 KB message, the fastest libraries take about a microsecond on the Mac and 1.5 to 2 + on x86-64. yyjson validates and sums + it slightly faster than `json_document` on the Mac, and yyjson and simdjson sum it slightly faster with GCC on + x86-64. + +### Reading into structs + +A view converts into your own types with the same [`from_json()`](../../features/arbitrary_types.md) as `json`, including the +ones the [`NLOHMANN_DEFINE_TYPE_*`](../../api/macros/nlohmann_define_type_non_intrusive.md) macros generate. That is as fast as picking the fields by hand from the view; only +for the many small records of `jeopardy.json` does it take a quarter longer. On the Mac, Glaze and serde_json, reading into +the same structs and checking everything, take 1.7 and 2.2 times as long (geometric mean over the four files). On a `json` value, `from_json()` costs about what +`json::parse()` costs. + +### nlohmann/json without `json_document` + +And nlohmann/json without `json_document`? `json` builds a tree of separate allocations, and it shows: for +*select*, *edit* and *minify* it takes several times as long as `json_document`, like Boost.JSON and RapidJSON. Where +no tree is needed, it is closer: on the Mac, [`json::accept()`](../../api/basic_json/accept.md) and a SAX handler are on par with Boost.JSON (on x86-64, +Boost.JSON is 20 to 35 % faster there), and `dump()` writes faster than Boost.JSON, RapidJSON, Glaze and +serde_json. + +### Results on x86-64 + +On x86-64, the same programs ran on a Haswell server, pinned to one core and built with `-march=haswell`: with the +newest GCC, 16.2 (the figure below), and with GCC 13, the default of Ubuntu 24.04, and Clang 23 (both in +[Appendix E](#e-comparison-with-other-libraries)). The compiler matters less than one might think. On the Mac, GCC 16 +and Clang 23 put the same library first in every column as Apple clang, and on x86-64, the three compilers disagree +only about *sum*. + +
+--8<-- "images/perf_blog_usecases_x86-gcc.svg" +
+ +

The same comparison on an x86-64 Haswell server with GCC 16.2, with the same cells and halves as the figure above. Less is better; hover over or tap a cell for the times and the way. The figures for GCC 13 and Clang 23 are in [Appendix E](#e-comparison-with-other-libraries).

+ +`json_document` is the fastest in five of the six columns with GCC and in all six with Clang. Behind those means, it +loses on single files: + +- **One pass over every value, with GCC.** simdjson's On-Demand API sums all numbers of `twitter.json`, + `citm_catalog.json` and `canada.json` in 0.85 to 0.91 of `json_document`'s time with GCC 16. With Clang, `json_document` is + ahead there, except on `canada.json`, where yyjson, which converts the floats during the parse, is faster than + converting them on access, and simdjson is about as fast. +- **Fresh large documents.** For the 56 MB `jeopardy.json`, a fresh document needs a fresh 52 MB index, and on Linux + the page faults of that much new memory are a large part of the time: copying the file into fresh memory alone + takes about half as long as `json_document`'s parse. Boost.JSON's SAX parser and sonic-rs, which build nothing, + validate and sum it in 0.63 to 0.77 of the time, and serde_json validates it in 0.85. Reusing the document cuts + `json_document`'s time by 40 to 47 %, and its `read()` then validates `jeopardy.json` faster than any of them. On the Mac, a + fresh document costs hardly more than a reused one. +- **Writing floats.** yyjson writes `canada.json` in 0.86 (GCC 16) to 0.93 (Clang) of the time, because + `json_document` first converts most floats from their text. Writing the source text instead + (`number_format::source`) avoids that. +- **Within a few percent.** With GCC, simdjson's DOM validates or selects from `twitter.json` and + `citm_catalog.json` 1 to 4 % faster in some of the combinations. + +The full tables, with each library's variants, are in [Appendix E](#e-comparison-with-other-libraries). ## What didn't work -The PRs record the ideas that measured worse, which is as useful as the ones that made it: +The pull requests record the ideas that measured worse, which is as useful as the ones that made it: -| idea | result | where | -| --- | --- | --- | -| make every walk iterative | 2–20 % slower on ordinary documents | [#5285][5285], [#5389][5389], [#5547][5547] | -| move the key out of the lexer's reused buffer | 11.9 % slower (later a win, see above) | [#5458][5458] | -| inline `scan_literal()` | Clang's dispatch grew from 233 to 278 instructions and got slower | [#5854][5854] | -| short-string table for strings up to 64 bytes | lost against 32 | [#5878][5878] | -| leave the serializer's buffers uninitialized | timings moved 18 % apart in opposite directions on two similar workloads, so dropped; done later in [#5883][5883], where instruction counts showed 170 instructions saved per `dump()` | [#5285][5285] | -| out-of-line throw helpers for JSON Pointer lookups | no measurable gain, dropped | [#5836][5836] | -| `json_view`: an "all ASCII" flag per string | `dump()` with `ensure_ascii` faster, but parsing 1–13 % slower | [#5879][5879] | -| `json_view`: convert floats while parsing | `canada.json` parse 36–90 % slower | [#5908][5908] | -| `json_view`: note a large object inline in the parse loop | `canada.json` 37 % slower | [#5628][5628] | -| `json_view`: vector-scan every string in `set()` | 14–16 % slower on 16-byte strings | [#5926][5926] | +| idea | result | +| --- | --- | +| make every walk iterative | 2–20 % slower on ordinary documents | +| move the key out of the lexer's reused buffer | 11.9 % slower (later a win, see theme 4) | +| inline `scan_literal()` | Clang's dispatch grew from 233 to 278 instructions and got slower | +| short-string table for strings up to 64 bytes | lost against 32 | +| leave the serializer's buffers uninitialized | timings moved 18 % apart in opposite directions on two similar workloads, so dropped; done later, when instruction counts showed 170 instructions saved per `dump()` | +| out-of-line throw helpers for JSON Pointer lookups | no measurable gain, dropped | +| `json_document`: an "all ASCII" flag per string | `dump()` with `ensure_ascii` faster, but parsing 1–13 % slower | +| `json_document`: convert floats while parsing | `canada.json` parse 36–90 % slower | +| `json_document`: note a large object inline in the parse loop | `canada.json` 37 % slower | +| `json_document`: vector-scan every string in `set()` | 14–16 % slower on 16-byte strings | -

Ideas that were measured and dropped, from the pull requests that tried them.

- -## Making fast paths safe - -Fast paths are where the bugs are: they read in 8- and 16-byte steps, they skip validation that the slow path did, and -they are taken only for some inputs. A large part of these PRs is checking them: - -- **Guard pages** ([#5826][5826]): the input is copied so that its last byte is the last readable byte of a page, and - the next page is unmapped. AddressSanitizer misses an over-read into the slack of the same heap allocation, and - fuzzers rarely end an input exactly at a page boundary; this test crashes on any over-read by one byte. -- **Differential fuzzing of the input kinds** ([#5827][5827]): every fuzz input is also parsed from an - `std::istringstream`, from `std::list` iterators (the byte path) and from a `FILE*`, and the value, the exception - id, the message and the byte offset must be identical. -- **Differential checks at scale**: 6.5 million float tokens against `strtod` including 60,000 exact halfway cases - ([#5617][5617]); `json_view`'s batched float output byte-identical to the general writer for 10⁹ generated tokens - ([#5908][5908]). For this post, we checked that 3.13.0 writes the same bytes as 3.12.0 in all five binary formats - for 39 test files, and the same JSON text for `twitter.json` and `citm_catalog.json`. -- **Mutation checks**: break the fast path on purpose (skip one byte too many, mark `"` as copyable) and make sure the - tests notice. In [#5878][5878], marking the quote as copyable fails 4,551 assertions. +

Ideas that were measured and dropped. [Appendix H](#h-pull-requests-by-theme) links the pull requests that tried them.

## The price -None of this is free at compile time. `json.hpp` grew from 25,526 to 45,582 lines (`json_view.hpp` is a separate -header of 11,310 lines that you only pay for if you include it). Apple clang 21 at `-O2`, median of 9 compilations: +None of this is free at compile time. `json.hpp` grew from 25,526 to 45,556 lines (`json_view.hpp` is a separate +header of 9,555 lines that you only pay for if you include it). To see what that means for a program, we compiled two +small ones with both versions: -| translation unit | 3.12.0 | 3.13.0 | 3.13.0 with `JSON_NO_AUTOMATIC_UDLS` | -| --- | --: | --: | --: | -| only includes `json.hpp` | 528 ms | 709 ms (+34 %) | 508 ms (−4 %) | -| parses, dumps and writes CBOR | 1,175 ms | 1,885 ms (+60 %) | 1,858 ms (+58 %) | +- `count_numbers` reads `twitter.json` and adds up all of its numbers, like the *sum* use case in + [How it compares](#six-use-cases); +- `server_config` reads a configuration file into a struct with `to_json()` and `from_json()`, changes it, and writes + it back with `dump(2)`. -

Compile time of one translation unit, Apple clang 21, `-O2`, median of 9 compilations; less is better.

+Each is one translation unit. We timed it with the 3.12.0 and the 3.13.0 header, and then with 3.13.0 as a +precompiled header and as a C++20 module, in a debug build (`-O0`) and an optimized one (`-O2`): -We have not broken the second row down by change. [`JSON_NO_AUTOMATIC_UDLS`](../../api/macros/json_no_automatic_udls.md) moves the -`_json` literals into their own header and more than makes up for the first row; the -[compile-time page](../../integration/compile_times.md) lists the other options. +
+--8<-- "images/perf_blog_price.svg" +
-## How we measured +

How much longer or shorter each program takes to compile than with 3.12.0, less is better: Apple clang 21 and GCC 16.2, CPU time of the compiler, median of 9 interleaved runs, C++20, Apple M1 Max. The one-off cost of building the precompiled header or the module is not included. Hover over a bar for the time in milliseconds; [Appendix G](#g-how-we-measured) has all times, the programs and the commands.

-**What is compared.** "3.12.0" is the released single header. "3.13.0" is `develop` at -[84c542164](https://github.com/nlohmann/json/commit/84c5421644) with seven of the maintainer's open, non-draft pull requests that touch code -merged in ([#5890][5890], [#5908][5908], [#5914][5914], [#5926][5926], [#5936][5936], [#5945][5945], -[#5947][5947]) and amalgamated. Merging #5890 onto today's `develop` left one duplicate member declaration, which we -removed; nothing else was changed. Both are compiled from the *same* benchmark source, the Google Benchmark suite in -[`tests/benchmarks`](https://github.com/nlohmann/json/tree/develop/tests/benchmarks), with the BON8 benchmarks -removed because 3.12.0 has no BON8. +3.13.0 takes 20 to 63 % longer to compile these programs. A good part of that is reading the header, and a +precompiled header or a module does that once instead of in every translation unit: -The x86-64 rows for *dump* and *parse+dump* of `canada.json` include one later commit of #5908 -([9fad526888](https://github.com/nlohmann/json/commit/9fad526888), the change at the end of theme 5), measured again -for this post; the other files' rows are from the runs before it. That commit changes neither the instructions nor -the mispredicted branches of dumping `twitter.json` or `citm_catalog.json` (callgrind, GCC 13 and Clang 18), and on -the M1 Max it changes the dump of `canada.json` by about 1 % (cycles). +- **In debug builds,** which are what you wait for while you edit, a precompiled 3.13.0 compiles faster than 3.12.0 + with Apple clang, and within 10 % of it with GCC. +- **In optimized builds,** less of the increase goes away, because the optimizer still works through all the code a + program instantiates. A precompiled header or a module wins back between a quarter and four fifths of it. +- **The one-off cost** is 0.9 s (Apple clang) or 2.3 s (GCC) to build the precompiled header, and 1.4 to 1.5 s or + 2.4 s to build the module, once per set of compiler flags. That pays for itself after two to six translation units. +- **Modules have caveats.** Apple clang needs `-fcxx-modules`, [module support](../../features/modules.md) still + depends heavily on the compiler version, and macros don't cross a module boundary: with `import nlohmann.json;`, + the `NLOHMANN_DEFINE_TYPE_*` macros aren't available, which is why `server_config` writes `to_json()` and + `from_json()` by hand. -| | | -| --- | --- | -| machine | Apple M1 Max laptop on AC power, macOS 27.0.1 | -| compiler | Apple clang 21, libc++ | -| flags | `-O3 -flto -DNDEBUG`, the compiler's default standard, C++14 (the timeline and `json_view` comparisons: C++17, `-O3`, no LTO) | -| suite | 2 rounds × 4 repetitions per version, random interleaving, each round started only when the load average was below 4; the median of all 8 | -| noise | the coefficient of variation was 3 % or less for 176 of the 182 rows with 3.12.0 and 178 with 3.13.0; the largest was 12 % | -| inputs | `twitter.json`, `citm_catalog.json` and `canada.json` from [nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark), a 56 MB `jeopardy.json`, and number-heavy files | - -

Setup of the Google Benchmark comparison of 3.12.0 and 3.13.0.

- -The cliffs come from small extra programs (C++17, `-O3`, median of 3 interleaved runs). The timeline is -[`tests/benchmarks/history`](https://github.com/nlohmann/json/tree/develop/tests/benchmarks/history): one program, -compiled against `single_include` of 3.12.0, of each of the 315 commits on `develop` that changed `json.hpp` or `json_view.hpp` since, and of the candidate, 4 rounds in random order, median of -the rounds. The `json_view` comparison is -[`tests/benchmarks/json_view/compare.py`](https://github.com/nlohmann/json/tree/develop/tests/benchmarks/json_view) -with pinned downloads of yyjson 0.13.0, simdjson 4.6.11 and Boost.JSON 1.92.0, 30 interleaved rounds, best round; -every engine must produce the same values, strings and sums of numbers before anything is timed. - -**What we did not measure.** All of our numbers are from one Apple silicon laptop with Clang. The PRs quote numbers -from an x86-64 Haswell server with GCC 13 and Clang 18 where they had them; that server shares its cores with other -work, so we did not run a second set of tables there and quote its timings only where a PR did. Expect smaller -gains for some workloads on x86-64 with glibc: its `FILE*` locking is cheaper to begin with, and its allocator -behaves differently. We did not test Windows for speed at all. +The [compile-time page](../../integration/compile_times.md) measures these and the other options, such as +including `` in headers that only name `json`, and +[`JSON_NO_AUTOMATIC_UDLS`](../../api/macros/json_no_automatic_udls.md). We did not measure binary size or peak +memory. ## Thanks -Most of what is in this post was invented by other people. Each library is listed with its license in -parentheses. +Most of what is in this post was invented by other people. **Code we adapted.** The library contains code adapted from these four projects. We use it under the MIT License, and the source files that contain it carry the authors' copyright lines and say what was taken; the @@ -839,13 +1335,15 @@ and the source files that contain it carry the authors' copyright lines and say - [fast_float](https://github.com/fastfloat/fast_float) (Apache-2.0, MIT or BSL-1.0) by Daniel Lemire and contributors: the Eisel-Lemire algorithm, its table of powers of five, its digit comparison for long numbers, and - its parsing of eight digits at a time (N. Mushtak and D. Lemire, "Fast number parsing without fallback", 2023). - W. D. Clinger for the fast path, M. Eisel for the algorithm. + its parsing of eight digits at a time (N. Mushtak and D. Lemire, + ["Fast number parsing without fallback"](https://arxiv.org/abs/2212.06644), 2023). + W. D. Clinger for the [fast path](https://doi.org/10.1145/93542.93557), M. Eisel for the algorithm. - [Żmij](https://github.com/vitaut/zmij) (MIT) by Victor Zverovich, with the digit conversion of Xiang JunBo and the SIMD sequence and compressed powers of ten of Dougall Johnson: ported to C++11. - [simdjson](https://github.com/simdjson/simdjson) (Apache-2.0 or MIT) by Daniel Lemire, Geoff Langdale, John Keiser - and contributors: the "lookup4" UTF-8 check and its tables (J. Keiser and D. Lemire, "Validating UTF-8 In Less - Than One Instruction Per Byte", 2021), in `json.hpp`'s lexer and in `json_view.hpp`. + and contributors: the "lookup4" UTF-8 check and its tables (J. Keiser and D. Lemire, + ["Validating UTF-8 In Less Than One Instruction Per Byte"](https://arxiv.org/abs/2010.03090), 2021), in `json.hpp`'s + lexer and in `json_view.hpp`. - [yyjson](https://github.com/ibireme/yyjson) (MIT) by YaoYuan: table-driven `\u` decoding and the unrolled checks at fixed offsets in `json_view.hpp`'s parser. @@ -865,22 +1363,1088 @@ and the source files that contain it carry the authors' copyright lines and say - [Boost.JSON](https://github.com/boostorg/json) (BSL-1.0): switching to a hash table for large objects. - [RapidJSON](https://github.com/Tencent/rapidjson) (MIT): the measured reason to keep recursion as the default. -And the people who sent or shaped pull requests: [@gregmarr](https://github.com/gregmarr) reviewed most of them and -suggested the sized-sentinel fast path, the peek design for exact stream positions, one SIMD switch for the whole -library, and the vector check of `json_view`'s strings on edit; [@veselink1](https://github.com/veselink1) and -[@michaelsam94](https://github.com/michaelsam94) wrote the allocator and exception-safety fixes for the destructor -that [#5762][5762] took over (the non-recursive destructor itself goes back to -[#1436](https://github.com/nlohmann/json/pull/1436) by [@nickaein](https://github.com/nickaein) in 2019); -[@commit-msuyog](https://github.com/commit-msuyog) gave the 128-bit multiplication behind Eisel-Lemire MSVC -intrinsics ([#5782][5782]); [@ayush-singh-0601](https://github.com/ayush-singh-0601) started the fix for deep values in the binary writers; -[@avionicharshit-byte](https://github.com/avionicharshit-byte) made `diff()` linear for shrinking arrays -([#5461][5461]); [@mvanslobbe](https://github.com/mvanslobbe) sped up the parser's separator check ([#5592][5592]); -and [@alexprabhat99](https://github.com/alexprabhat99) removed the temporary values behind CBOR and MessagePack -object keys ([#5328][5328]). +And the people who sent or shaped pull requests: + +- [@gregmarr](https://github.com/gregmarr) reviewed most of them and suggested the sized-sentinel fast path, the peek + design for exact stream positions, one SIMD switch for the whole library, and the vector check of `json_view`'s + strings on edit; +- [@veselink1](https://github.com/veselink1) and [@michaelsam94](https://github.com/michaelsam94) wrote the allocator + and exception-safety fixes for the destructor that [#5762][5762] took over; the non-recursive destructor itself + goes back to [#1436](https://github.com/nlohmann/json/pull/1436) by [@nickaein](https://github.com/nickaein) in + 2019; +- [@commit-msuyog](https://github.com/commit-msuyog) gave the 128-bit multiplication behind Eisel-Lemire MSVC + intrinsics ([#5782][5782]); +- [@ayush-singh-0601](https://github.com/ayush-singh-0601) started the fix for deep values in the binary writers; +- [@avionicharshit-byte](https://github.com/avionicharshit-byte) made `diff()` linear for shrinking arrays + ([#5461][5461]); +- [@mvanslobbe](https://github.com/mvanslobbe) sped up the parser's separator check ([#5592][5592]); +- [@alexprabhat99](https://github.com/alexprabhat99) removed the temporary values behind CBOR and MessagePack object + keys ([#5328][5328]). + `twitter.json`, `citm_catalog.json` and `canada.json` come from Milo Yip's [nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark) (MIT). +## Appendix + +### A. Test files + +| file | size | what it is | what makes it hard | +| --- | --: | --- | --- | +| `twitter.json` | 632 KB | 100 tweets from Twitter's search API, with their users | strings: 58 % of the bytes are keys and strings, 15 % of the bytes are non-ASCII (almost all of it Japanese text), and 13,345 keys | +| `citm_catalog.json` | 1.7 MB | a concert hall's catalog of events, performances and seat categories, in French | structure: 21,388 small objects and arrays, 14,392 integers, keys that average 8 bytes, and 71 % whitespace from indentation | +| `canada.json` | 2.3 MB | the outline of Canada in GeoJSON | numbers: 111,080 floating-point coordinates, most with 16 or 17 significant digits, in 56,045 arrays, and almost no whitespace | +| `jeopardy.json` | 56 MB | 216,930 Jeopardy! questions as one array of objects | size: 1.5 million short strings in objects of 7 members; far larger than the CPU caches | + +

The test files. The first three are from Milo Yip's [nativejson-benchmark](https://github.com/miloyip/nativejson-benchmark). The counts are of the parsed values; the share of whitespace, string and non-ASCII bytes is of the file as distributed. Several changes target the indentation of `citm_catalog.json`: in the timeline benchmark, a minified copy of it parses 1.9× as fast as with 3.12.0, against 3.3× for the file as distributed.

+ +### B. 3.12.0 against 3.13.0 + +The rows of the first chart: + +| workload | 3.12.0 | 3.13.0 | speedup | +| --- | --: | --: | --: | +| `json::parse()` of `twitter.json` | 3.16 ms | 1.05 ms | 3.0× | +| `json::parse()` of `citm_catalog.json` | 7.20 ms | 1.75 ms | 4.1× | +| `json::parse()` of `canada.json` | 15.1 ms | 4.35 ms | 3.5× | +| `json::parse()` of `canada.json`, indented by 4 spaces | 33.8 ms | 5.02 ms | 6.7× | +| `ordered_json::parse()` of `citm_catalog.json` | 10.8 ms | 1.64 ms | 6.6× | +| `json::parse()` of `twitter.json` from an `std::ifstream` | 3.34 ms | 1.35 ms | 2.5× | +| `json::parse()` of `citm_catalog.json` from a `FILE*` | 34.6 ms | 7.26 ms | 4.8× | +| `json::accept()` of `citm_catalog.json` | 6.36 ms | 0.91 ms | 7.0× | +| `dump()` of `twitter.json` | 1.39 ms | 0.208 ms | 6.7× | +| `dump()` of `canada.json` | 6.63 ms | 2.25 ms | 2.9× | +| `dump(4)` of `citm_catalog.json` | 1.93 ms | 0.416 ms | 4.6× | +| `to_cbor()` of `twitter.json` | 0.638 ms | 0.142 ms | 4.5× | +| `from_cbor()` of `twitter.json` from memory | 3.00 ms | 0.965 ms | 3.1× | +| `from_cbor()` of `twitter.json` from a `FILE*` | 9.71 ms | 1.54 ms | 6.3× | +| `diff()` of `canada.json` with every eighth scalar changed | 38.3 ms | 3.67 ms | 10.4× | +| iterating over every value of `canada.json` | 0.861 ms | 0.320 ms | 2.7× | +| copying `citm_catalog.json` and destroying the copy | 1.61 ms | 1.45 ms | 1.11× | +| `==` of `citm_catalog.json` and a copy | 0.264 ms | 0.254 ms | 1.04× | + +

Time per call with 3.12.0 and 3.13.0, Google Benchmark suite on an Apple M1 Max, median of 8 runs; the speedup is the old time divided by the new one. The parse rows do not include destroying the result (the suite pauses the timer for that).

+ +??? info "All 182 benchmarks of the suite" + + | benchmark | 3.12.0 | 3.13.0 | speedup | + | --- | --: | --: | --: | + | `Accept/canada` | 12.7 ms | 2.26 ms | 5.61× | + | `Accept/citm_catalog` | 6.36 ms | 909 µs | 6.99× | + | `Accept/floats` | 113 ms | 24 ms | 4.72× | + | `Accept/jeopardy` | 220 ms | 63.5 ms | 3.47× | + | `Accept/signed_ints` | 115 ms | 28.5 ms | 4.04× | + | `Accept/small_signed_ints` | 55.8 ms | 18.9 ms | 2.96× | + | `Accept/twitter` | 2.46 ms | 458 µs | 5.36× | + | `Accept/unsigned_ints` | 114 ms | 27.4 ms | 4.17× | + | `BinaryToCbor/1024` | 304 ns | 95.9 ns | 3.17× | + | `BinaryToCbor/128` | 247 ns | 110 ns | 2.24× | + | `BinaryToCbor/16384` | 947 ns | 408 ns | 2.32× | + | `BinaryToCbor/16` | 238 ns | 46.5 ns | 5.13× | + | `BinaryToCbor/2048` | 333 ns | 114 ns | 2.92× | + | `BinaryToCbor/256` | 270 ns | 86.3 ns | 3.12× | + | `BinaryToCbor/32768` | 1.54 µs | 807 ns | 1.91× | + | `BinaryToCbor/32` | 252 ns | 47.3 ns | 5.32× | + | `BinaryToCbor/4096` | 402 ns | 159 ns | 2.53× | + | `BinaryToCbor/512` | 291 ns | 92.8 ns | 3.14× | + | `BinaryToCbor/64` | 251 ns | 81.6 ns | 3.07× | + | `BinaryToCbor/8192` | 511 ns | 239 ns | 2.14× | + | `BinaryToCbor/8` | 243 ns | 46.6 ns | 5.21× | + | `Copy/canada` | 3.64 ms | 2.83 ms | 1.29× | + | `Copy/citm_catalog` | 1.61 ms | 1.45 ms | 1.11× | + | `Copy/twitter` | 797 µs | 722 µs | 1.10× | + | `CopyAssign/canada` | 3.69 ms | 2.88 ms | 1.28× | + | `CopyAssign/citm_catalog` | 1.67 ms | 1.48 ms | 1.13× | + | `CopyAssign/twitter` | 805 µs | 735 µs | 1.09× | + | `CopyOnly/canada` | 1.53 ms | 1.5 ms | 1.03× | + | `CopyOnly/citm_catalog` | 735 µs | 784 µs | 0.94× | + | `CopyOnly/twitter` | 394 µs | 399 µs | 0.99× | + | `CopyRing/canada` | 3.69 ms | 2.89 ms | 1.28× | + | `CopyRing/citm_catalog` | 1.7 ms | 1.51 ms | 1.13× | + | `CopyRing/twitter` | 855 µs | 767 µs | 1.12× | + | `DestroyOnly/canada` | 2.14 ms | 1.37 ms | 1.56× | + | `DestroyOnly/citm_catalog` | 874 µs | 664 µs | 1.32× | + | `DestroyOnly/twitter` | 402 µs | 323 µs | 1.25× | + | `Diff/canada` | 38.3 ms | 3.67 ms | 10.4× | + | `Diff/citm_catalog` | 6.74 ms | 1.07 ms | 6.29× | + | `Diff/twitter` | 4.79 ms | 636 µs | 7.54× | + | `Dump/canada / -` | 6.63 ms | 2.25 ms | 2.95× | + | `Dump/canada / 4` | 8.9 ms | 2.99 ms | 2.97× | + | `Dump/citm_catalog / -` | 1.38 ms | 291 µs | 4.74× | + | `Dump/citm_catalog / 4` | 1.93 ms | 416 µs | 4.63× | + | `Dump/floats / -` | 62.8 ms | 23.3 ms | 2.69× | + | `Dump/floats / 4` | 71.1 ms | 24.1 ms | 2.95× | + | `Dump/jeopardy / -` | 201 ms | 30.4 ms | 6.62× | + | `Dump/jeopardy / 4` | 219 ms | 34.4 ms | 6.37× | + | `Dump/signed_ints / -` | 23.4 ms | 16.2 ms | 1.45× | + | `Dump/signed_ints / 4` | 31.8 ms | 16.8 ms | 1.89× | + | `Dump/small_signed_ints / -` | 17.8 ms | 7.87 ms | 2.27× | + | `Dump/small_signed_ints / 4` | 25 ms | 8.63 ms | 2.90× | + | `Dump/twitter / -` | 1.39 ms | 208 µs | 6.67× | + | `Dump/twitter / 4` | 1.56 ms | 248 µs | 6.31× | + | `Dump/unsigned_ints / -` | 23.4 ms | 16.6 ms | 1.41× | + | `Dump/unsigned_ints / 4` | 31.5 ms | 17.4 ms | 1.81× | + | `Equal/canada` | 454 µs | 333 µs | 1.36× | + | `Equal/citm_catalog` | 264 µs | 254 µs | 1.04× | + | `Equal/twitter` | 141 µs | 126 µs | 1.12× | + | `Flatten/canada` | 28.2 ms | 11.1 ms | 2.53× | + | `Flatten/citm_catalog` | 6.44 ms | 2.96 ms | 2.17× | + | `Flatten/twitter` | 3.49 ms | 2.01 ms | 1.74× | + | `FlattenOrdered/citm_catalog` | 253 ms | 1.37 ms | 184× | + | `FlattenOrdered/twitter` | 49.3 ms | 851 µs | 57.8× | + | `FromBinaryBuffer/bjdata / canada` | 8.08 ms | 4.17 ms | 1.94× | + | `FromBinaryBuffer/bjdata / twitter` | 3.12 ms | 963 µs | 3.24× | + | `FromBinaryBuffer/bjdata_optimized / canada` | 8.53 ms | 2.93 ms | 2.91× | + | `FromBinaryBuffer/bjdata_optimized / twitter` | 3.14 ms | 967 µs | 3.25× | + | `FromBinaryBuffer/bson / canada` | 9.21 ms | 5.51 ms | 1.67× | + | `FromBinaryBuffer/bson / citm_catalog` | 3.86 ms | 1.74 ms | 2.23× | + | `FromBinaryBuffer/bson / twitter` | 3.07 ms | 998 µs | 3.08× | + | `FromBinaryBuffer/cbor / canada` | 8.2 ms | 2.31 ms | 3.55× | + | `FromBinaryBuffer/cbor / citm_catalog` | 3.7 ms | 1.46 ms | 2.53× | + | `FromBinaryBuffer/cbor / floats` | 28.8 ms | 8.23 ms | 3.51× | + | `FromBinaryBuffer/cbor / jeopardy` | 352 ms | 116 ms | 3.04× | + | `FromBinaryBuffer/cbor / signed_ints` | 35.7 ms | 12.8 ms | 2.79× | + | `FromBinaryBuffer/cbor / twitter` | 3 ms | 965 µs | 3.11× | + | `FromBinaryBuffer/msgpack / canada` | 8.21 ms | 2.28 ms | 3.61× | + | `FromBinaryBuffer/msgpack / citm_catalog` | 3.7 ms | 1.42 ms | 2.60× | + | `FromBinaryBuffer/msgpack / jeopardy` | 354 ms | 110 ms | 3.22× | + | `FromBinaryBuffer/msgpack / twitter` | 3.02 ms | 938 µs | 3.22× | + | `FromBinaryBuffer/ubjson / canada` | 8.14 ms | 4.16 ms | 1.96× | + | `FromBinaryBuffer/ubjson / citm_catalog` | 3.81 ms | 1.74 ms | 2.20× | + | `FromBinaryBuffer/ubjson / jeopardy` | 367 ms | 115 ms | 3.19× | + | `FromBinaryBuffer/ubjson / twitter` | 3.12 ms | 963 µs | 3.24× | + | `FromBinaryBuffer/ubjson_optimized / canada` | 8.36 ms | 2.83 ms | 2.96× | + | `FromBinaryBuffer/ubjson_optimized / twitter` | 3.13 ms | 960 µs | 3.26× | + | `FromBinaryFile/bjdata / twitter` | 10.3 ms | 1.9 ms | 5.39× | + | `FromBinaryFile/bson / twitter` | 9.98 ms | 1.78 ms | 5.60× | + | `FromBinaryFile/cbor / canada` | 14.2 ms | 4.38 ms | 3.24× | + | `FromBinaryFile/cbor / twitter` | 9.71 ms | 1.54 ms | 6.31× | + | `FromBinaryFile/ubjson / canada` | 13.4 ms | 6.2 ms | 2.16× | + | `FromBinaryFile/ubjson / twitter` | 10.4 ms | 1.91 ms | 5.47× | + | `FromBinaryShape/containers / bjdata` | 14.1 ms | 7.05 ms | 2.01× | + | `FromBinaryShape/containers / bson` | 17 ms | 9.81 ms | 1.73× | + | `FromBinaryShape/containers / cbor` | 13.8 ms | 3.84 ms | 3.60× | + | `FromBinaryShape/containers / msgpack` | 13.7 ms | 3.71 ms | 3.70× | + | `FromBinaryShape/containers / ubjson_optimized` | 14.7 ms | 4.8 ms | 3.07× | + | `FromBinaryShape/containers / ubjson` | 14.1 ms | 6.87 ms | 2.05× | + | `FromBinaryShape/nested / bjdata` | 96 µs | 37.9 µs | 2.53× | + | `FromBinaryShape/nested / bson` | 102 µs | 46.1 µs | 2.21× | + | `FromBinaryShape/nested / cbor` | 93.1 µs | 34.4 µs | 2.70× | + | `FromBinaryShape/nested / msgpack` | 90.4 µs | 34.2 µs | 2.64× | + | `FromBinaryShape/nested / ubjson` | 96.1 µs | 37.8 µs | 2.54× | + | `FromBinaryShape/scalars / bjdata` | 24.3 ms | 11.2 ms | 2.17× | + | `FromBinaryShape/scalars / cbor` | 25.5 ms | 9.63 ms | 2.65× | + | `FromBinaryShape/scalars / msgpack` | 24.1 ms | 9.78 ms | 2.46× | + | `FromBinaryShape/scalars / ubjson` | 24.7 ms | 11.4 ms | 2.17× | + | `FromCborChunkedString/10000 chunks` | 89.6 µs | 81.3 µs | 1.10× | + | `FromMsgpack/canada` | 14.2 ms | 4.37 ms | 3.26× | + | `FromMsgpack/citm_catalog` | 8.86 ms | 2.25 ms | 3.94× | + | `FromMsgpack/floats` | 59.3 ms | 27.2 ms | 2.18× | + | `FromMsgpack/jeopardy` | 1,120 ms | 181 ms | 6.17× | + | `FromMsgpack/signed_ints` | 62 ms | 31.9 ms | 1.94× | + | `FromMsgpack/small_signed_ints` | 62.8 ms | 33.4 ms | 1.88× | + | `FromMsgpack/twitter` | 9.7 ms | 1.46 ms | 6.64× | + | `FromMsgpack/unsigned_ints` | 55.1 ms | 27.2 ms | 2.02× | + | `GetArray>` | 2.23 µs | 630 ns | 3.54× | + | `GetArray>` | 8.11 µs | 1.16 µs | 7.02× | + | `GetArray>` | 58.1 µs | 40.9 µs | 1.42× | + | `GetArray>` | 6.59 µs | 655 ns | 10.1× | + | `GetMap/citm_catalog` | 3.41 ms | 2.37 ms | 1.44× | + | `GetVectorDouble/floats` | 6.62 ms | 641 µs | 10.3× | + | `GetVectorInt/signed_ints` | 8.04 ms | 3.36 ms | 2.40× | + | `Iterate/canada` | 861 µs | 320 µs | 2.69× | + | `Iterate/citm_catalog` | 298 µs | 167 µs | 1.78× | + | `Iterate/twitter` | 87.1 µs | 61.8 µs | 1.41× | + | `JsonPointerAt/citm_catalog` | 1.81 ms | 1.11 ms | 1.63× | + | `JsonPointerAt/twitter` | 780 µs | 585 µs | 1.33× | + | `JsonPointerContains/citm_catalog` | 2.72 ms | 1.24 ms | 2.20× | + | `JsonPointerContains/twitter` | 1.28 ms | 606 µs | 2.11× | + | `JsonPointerParse/citm_catalog` | 5.65 ms | 2.17 ms | 2.60× | + | `JsonPointerParse/twitter` | 2.41 ms | 979 µs | 2.46× | + | `JsonPointerToString/citm_catalog` | 6.64 ms | 1.87 ms | 3.55× | + | `JsonPointerToString/twitter` | 2.17 ms | 794 µs | 2.73× | + | `ParseFILE/canada` | 52.2 ms | 13.9 ms | 3.76× | + | `ParseFILE/citm_catalog` | 34.6 ms | 7.26 ms | 4.76× | + | `ParseFILE/twitter` | 13.6 ms | 3.28 ms | 4.14× | + | `ParseFile/canada` | 17.9 ms | 6.12 ms | 2.93× | + | `ParseFile/citm_catalog` | 7.63 ms | 2.4 ms | 3.18× | + | `ParseFile/floats` | 131 ms | 48.9 ms | 2.69× | + | `ParseFile/jeopardy` | 327 ms | 157 ms | 2.08× | + | `ParseFile/signed_ints` | 125 ms | 46.2 ms | 2.70× | + | `ParseFile/small_signed_ints` | 63.1 ms | 31.4 ms | 2.01× | + | `ParseFile/twitter` | 3.34 ms | 1.35 ms | 2.46× | + | `ParseFile/unsigned_ints` | 122 ms | 44 ms | 2.77× | + | `ParseIndented/canada / 4` | 33.8 ms | 5.02 ms | 6.74× | + | `ParseIndented/citm_catalog / 4` | 7.28 ms | 1.75 ms | 4.15× | + | `ParseIndented/jeopardy / 4` | 334 ms | 131 ms | 2.54× | + | `ParseIndented/twitter / 4` | 3.58 ms | 1.11 ms | 3.24× | + | `ParseStreamValues/ndjson` | 6.96 ms | 3.73 ms | 1.87× | + | `ParseStreamValues/numbers` | 1.87 ms | 371 µs | 5.04× | + | `ParseString/canada` | 15.1 ms | 4.35 ms | 3.46× | + | `ParseString/citm_catalog` | 7.2 ms | 1.75 ms | 4.13× | + | `ParseString/floats` | 119 ms | 30.2 ms | 3.93× | + | `ParseString/jeopardy` | 305 ms | 130 ms | 2.35× | + | `ParseString/signed_ints` | 120 ms | 31.4 ms | 3.80× | + | `ParseString/small_signed_ints` | 60.5 ms | 21.9 ms | 2.77× | + | `ParseString/twitter` | 3.16 ms | 1.05 ms | 3.02× | + | `ParseString/unsigned_ints` | 118 ms | 30.3 ms | 3.90× | + | `ParseStringOrdered/canada` | 15 ms | 4.29 ms | 3.49× | + | `ParseStringOrdered/citm_catalog` | 10.8 ms | 1.64 ms | 6.58× | + | `ParseStringOrdered/jeopardy` | 356 ms | 111 ms | 3.21× | + | `ParseStringOrdered/twitter` | 4.32 ms | 911 µs | 4.75× | + | `Patch/canada` | 9.81 ms | 3.36 ms | 2.92× | + | `Patch/citm_catalog` | 2.49 ms | 1.61 ms | 1.55× | + | `Patch/twitter` | 1.45 ms | 849 µs | 1.71× | + | `SaxParse/canada` | 12.8 ms | 3.22 ms | 3.99× | + | `SaxParse/citm_catalog` | 6.34 ms | 970 µs | 6.54× | + | `SaxParse/twitter` | 2.47 ms | 472 µs | 5.23× | + | `ToCbor/canada` | 1.37 ms | 546 µs | 2.51× | + | `ToCbor/citm_catalog` | 1.02 ms | 258 µs | 3.96× | + | `ToCbor/floats` | 8.85 ms | 1.88 ms | 4.69× | + | `ToCbor/jeopardy` | 71.6 ms | 21.1 ms | 3.39× | + | `ToCbor/signed_ints` | 11.3 ms | 2.77 ms | 4.09× | + | `ToCbor/small_signed_ints` | 10.2 ms | 2.39 ms | 4.28× | + | `ToCbor/twitter` | 638 µs | 142 µs | 4.50× | + | `ToCbor/unsigned_ints` | 7.99 ms | 2.76 ms | 2.90× | + | `ToJsonStrings/copy` | 5.83 ms | 5.54 ms | 1.05× | + | `ToJsonStrings/move` | 5.84 ms | 3.02 ms | 1.93× | + | `Unflatten/canada` | 40.5 ms | 10.7 ms | 3.76× | + | `Unflatten/citm_catalog` | 9.66 ms | 3.47 ms | 2.78× | + | `Unflatten/twitter` | 4.48 ms | 2.11 ms | 2.12× | + +### C. The timeline + +The other four workloads we followed: + +- `accept()` of `twitter.json`: the lexer alone, since `accept()` only validates and builds nothing; +- `parse()` of `twitter.json` from an `std::ifstream`: reading from a stream instead of a string; +- `dump()` of `canada.json`: writing floating-point numbers; +- `to_cbor()` of `twitter.json`: writing a binary format. + +
+
+--8<-- "images/perf_blog_timeline_accept_twitter.svg" +
+
+--8<-- "images/perf_blog_timeline_parse_twitter_ifstream.svg" +
+
+--8<-- "images/perf_blog_timeline_dump_canada.svg" +
+
+--8<-- "images/perf_blog_timeline_to_cbor_twitter.svg" +
+
+ +

Speedup over 3.12.0 after each commit that changed the headers, for the four workloads not shown in the timeline section. More is better; the badges are theme numbers.

+ +The parse panels include destroying the result: the benchmark returns `json::parse(text).size()`, so the changes to +the destructor ([#5762][5762], [#5835][5835]) show up there too, as steps of up to 6 % in either direction. When +`accept()` of `twitter.json` got 2.5 % slower over the last 20 commits, we timed the two ends against each other in +one binary with six code layouts: they were equal within 0.2 %. + +| workload | theme | pull request | change | step | +| --- | :-: | --- | --- | --: | +| `parse()` `citm_catalog.json` | 4 | [#5234][5234] | the token buffer is filled only for error messages | −35 % | +| | 1 | [#5283][5283] | fast paths for contiguous input | −19 % | +| | 4 | [#5592][5592] | check for the expected `:` or `,` before the lexer's token switch | −7 % | +| | 4 | [#5809][5809] | positions derived only on error | −12 % | +| | 2 | [#5810][5810] | indentation skipped eight bytes at a time | −12 % | +| | 4 | [#5882][5882] | arrays allocated once, at their final size | −6 % | +| `parse()` `canada.json` | 4 | [#5234][5234] | the token buffer is filled only for error messages | −10 % | +| | 1 | [#5283][5283] | fast paths for contiguous input | −24 % | +| | 3 | [#5617][5617] | Eisel-Lemire instead of `strtod` | −9 % | +| | 3 | [#5738][5738] | own float parser, string scan, `\u` table | −14 % | +| | 3 | [#5851][5851] | digits accumulated while validating, eight at a time | −12 % | +| | 4 | [#5882][5882] | arrays allocated once, at their final size | −15 % | +| `accept()` `twitter.json` | 4 | [#5234][5234] | the token buffer is filled only for error messages | −18 % | +| | 1 | [#5283][5283] | fast paths for contiguous input | −53 % | +| | 4 | [#5592][5592] | check for the expected `:` or `,` before the lexer's token switch | −11 % | +| | 4 | [#5809][5809] | positions derived only on error | −23 % | +| | 2 | [#5810][5810] | indentation skipped eight bytes at a time | −9 % | +| | 2 | [#5853][5853] | strings scanned 16 bytes at a time with SSE2 or NEON | −11 % | +| `parse()` `twitter.json`, `std::ifstream` | 1 | [#5828][5828] | scanning the stream's get area in bulk | −48 % | +| | 1 | [#5884][5884] | inline get-area path, binary reads | −5 % | +| `dump()` `twitter.json` | 6 | [#5285][5285] | a write buffer and bulk copies of strings | −70 % | +| | 2 | [#5738][5738] | own float parser, string scan, `\u` table | −19 % | +| | 2 | [#5878][5878] | short strings checked with a table | −6 % | +| | 2 | [#5883][5883] | strings of 16 to 32 bytes as two overlapping vectors | −34 % | +| `dump()` `canada.json` | 6 | [#5285][5285] | a write buffer and bulk copies of strings | −8 % | +| | 3 | [#5634][5634] | Żmij instead of Grisu2 | −65 % | +| `from_cbor()` `twitter.json` | 1 | [#5233][5233] | binary strings read in bulk | −32 % | +| | 4 | [#5501][5501] | the result moved instead of copied | −33 % | +| | U | [#5185][5185] | UTF-8 validation of every text string | +37 % | +| | U | [#5746][5746] | the validation made an option ([#5741][5741]) | −27 % | +| `to_cbor()` `twitter.json` | 4 | [#5328][5328] | no temporary `basic_json` per object key (by [@alexprabhat99](https://github.com/alexprabhat99)) | −55 % | +| | 6 | [#5824][5824] | a cursor instead of `vector::insert()` | −38 % | +| | 6 | [#5885][5885] | runs of numbers encoded in a loop | −32 % | + +

The labeled steps of the timeline: the change in time at the first commit of each pull request, against the commit before it. [#5592][5592] is by [@mvanslobbe](https://github.com/mvanslobbe).

+ +### D. Algorithmic fixes + +| operation | 3.12.0 | 3.13.0 | speedup | cause | PR | +| --- | --: | --: | --: | --- | --- | +| `diff()` of an array of 64,000 numbers against an empty array | 4,102 ms | 9.98 ms | 411× | each `remove` was inserted at the front of the patch | [#5461][5461] | +| `diff()` of an array of 20,000 objects against every second one of them | 119 ms | 3.85 ms | 31× | the same | [#5461][5461] | +| `parse()` with a callback that rejects half of 32,000 objects | 1,334 ms | 11.5 ms | 116× | each rejected value was searched for from the start of its parent | [#5457][5457] | +| `<` on two equal values nested 24 levels deep (C++11 to C++17) | 62.6 ms | 0.002 ms | exponential | `std::vector`'s `<` asks `a < b` and `b < a`, and both recurse | [#5390][5390] | +| `<` on `citm_catalog.json` and a copy, 10× (C++11 to C++17) | 274 ms | 3.81 ms | 72× | the same | [#5390][5390] | +| `flatten()` of `citm_catalog.json` as `ordered_json` | 253 ms | 1.37 ms | 184× | every new key was looked up linearly | [#5834][5834] | +| `to_bson()` of a value nested 200 levels deep, 100× | 19.5 ms | 0.566 ms | 34× | each document's size was computed by walking everything below it again | [#5553][5553] | +| 100,000 × `push_back()` on an `ordered_json` with [`JSON_DIAGNOSTICS`](../../api/macros/json_diagnostics.md) | 1,514 ms | 4.98 ms | 304× | every insert re-pointed the parent pointers of all elements | [#5832][5832] | +| 10,000 × `at(i)` on an `ordered_json` array with `JSON_DIAGNOSTICS` | 43.2 ms | 0.081 ms | 533× | the same | [#5832][5832] | + +

Operations that were quadratic or worse in 3.12.0, timed with both versions (C++17, `-O3`, median of 3 interleaved runs).

+ +### E. Comparison with other libraries + +**Method.** The programs are in +[`tests/benchmarks/json_view/others`](https://github.com/nlohmann/json/tree/develop/tests/benchmarks/json_view/others), +whose README lists every variant, the pinned versions and checksums of every library, and the build commands. The +libraries: [yyjson](https://github.com/ibireme/yyjson) 0.13.0, [simdjson](https://github.com/simdjson/simdjson) +4.6.11, [sonic-cpp](https://github.com/bytedance/sonic-cpp) 1.0.2, [RapidJSON](https://github.com/Tencent/rapidjson) +(master, 24b5e7a), [Glaze](https://github.com/stephenberry/glaze) 9.0.0, [Boost.JSON](https://github.com/boostorg/json) +1.92, and in Rust [sonic-rs](https://github.com/cloudwego/sonic-rs) 0.5.10, +[simd-json](https://github.com/simd-lite/simd-json) 0.19.0 and [serde_json](https://github.com/serde-rs/json) +1.0.154. C++23 with +`-O3`; on the Mac Apple clang 21 (the compiler of the current Xcode), on x86-64 GCC 16.2, GCC 13 (Ubuntu 24.04's +default) and Clang 23 with `-march=haswell`, pinned to one core; Rust 1.99 with `-C target-cpu=haswell` on x86-64. Every +variant runs in every round, interleaved, each timed call after an untimed one; the time is the best of 2 × 30 rounds +(2 × 6 for `jeopardy.json`). Boost.JSON uses a monotonic resource and precise number parsing, RapidJSON +`kParseFullPrecisionFlag`, serde_json `float_roundtrip`: every library has to convert every number exactly. + +**Validation levels.** A way validates fully if it rejects all three broken inputs (cut short by one byte, a +stray comma, an invalid UTF-8 byte in a string); "U" accepts the invalid UTF-8 byte; "P" accepts one of the other +two. These three probes are not a conformance suite; they separate the ways that check everything from those that +check less. sonic-cpp 1.0.2 does not check UTF-8. RapidJSON does only with `kParseValidateEncodingFlag`, and +serde_json reading into `IgnoredAny` or structs from bytes doesn't check the strings it skips, unless the input is +checked with `std::str::from_utf8` first; both are shown both ways. simdjson's On-Demand API, Glaze's `lazy_json`, +`simdjson::minify()` and Glaze's `minify_json()` don't validate what they skip, and Glaze's structs only with +`validate_skipped`. + +**Choices.** A library's time is its fastest fully validating way per file; "(U …)" and "(P …)" give a faster +way that checks less. A cell of the figures is the geometric mean of a library's four times, divided by the smallest +such mean in its column. Variants that keep a parser or document across calls (simdjson's parsers, +`json_document::read()`) are measured but not chosen. Neither are variants that copy each number's text instead of +formatting it (`json_document` with `number_format::source`, RapidJSON with `kParseNumbersAsStringsFlag`); they matter +only for `canada.json` (`json_document`'s *write*: 398 µs instead of 1,621 µs on the Mac). nlohmann/json's struct +variants use the `NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE` macro, Glaze's and serde's their reflection and `derive`; all +three declare the same fields. + +
+--8<-- "images/perf_blog_usecases_x86-clang.svg" +
+ +

The use cases on the x86-64 Haswell server with Clang 23. Less is better; hover over or tap a cell for the times and the way.

+ +
+--8<-- "images/perf_blog_usecases_x86-gcc13.svg" +
+ +

The use cases on the x86-64 Haswell server with GCC 13, the default compiler of Ubuntu 24.04. Less is better; hover over or tap a cell for the times and the way.

+ +??? info "Times in µs on the Apple M1 Max" + + **validate** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | accept, parse | 176 | 359 | 943 | 22,862 | 1.0 | + | yyjson | insitu (copy), read | 180 | 473 | 1,493 | 30,542 | 0.9 | + | simdjson | DOM | 221 | 493 | 2,104 | 27,311 | 1.1 | + | sonic-rs (Rust) | Value | 329 | 684 | 1,930 | 32,169 | 1.4 | + | Glaze | validate_json | 329 | 853 | 1,302 | 46,471 | 1.4 | + | simd-json (Rust) | tape (copy) | 304 | 709 | 2,286 | 39,592 | 1.7 | + | sonic-cpp | Document [U] | – (U 380) | – (U 982) | – (U 2,577) | – (U 41,571) | – (U 1.6) | + | serde_json (Rust) | IgnoredAny [U], from_utf8 + IgnoredAny | 457 (U 354) | 1,105 (U 1,052) | 1,532 (U 1,459) | 47,547 (U 44,881) | 2.0 (U 1.7) | + | nlohmann/json `json` | accept | 481 | 897 | 2,463 | 63,383 | 2.4 | + | Boost.JSON | SAX | 536 | 1,017 | 3,065 | 55,102 | 2.3 | + | RapidJSON | SAX, insitu (copy), insitu (copy) (no encoding check) [U] | 1,314 (U 704) | 1,568 (U 1,150) | 6,871 | 142,654 (U 65,584) | 6.1 (U 2.6) | + + **sum** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse | 226 | 480 | 1,804 | 29,208 | 1.2 | + | yyjson | insitu (copy), read | 229 | 573 | 1,937 | 37,916 | 1.1 | + | simdjson | DOM, On-Demand | 256 | 608 | 2,594 | 33,706 | 1.3 | + | sonic-rs (Rust) | visitor | 372 | 778 | 2,695 | 41,462 | 1.6 | + | simd-json (Rust) | visitor (copy) | 372 | 866 | 2,727 | 48,506 | 2.0 | + | sonic-cpp | Document [U] | – (U 427) | – (U 1,091) | – (U 2,976) | – (U 48,840) | – (U 1.9) | + | nlohmann/json `json` | sax | 461 | 928 | 3,100 | 63,272 | 2.5 | + | Boost.JSON | SAX | 537 | 1,020 | 3,046 | 54,818 | 2.3 | + | serde_json (Rust) | visitor | 665 | 1,229 | 4,813 | 66,093 | 2.5 | + | RapidJSON | SAX, insitu (copy), insitu (copy) (no encoding check) [U] | 1,331 (U 755) | 1,626 (U 1,258) | 6,924 | 149,474 (U 72,381) | 6.1 (U 2.9) | + | Glaze | generic, lazy_json [P] | 1,323 | 2,845 | 9,777 | 151,441 | 6.7 (P 3.5) | + + **select** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse, structs (from_json) | 187 | 367 | 987 | 24,409 | 1.0 | + | yyjson | insitu (copy), read | 188 | 481 | 1,493 | 33,546 | 1.1 | + | simdjson | DOM, On-Demand [P] | 231 (P 144) | 510 | 2,104 (P 646) | 32,075 (P 18,601) | 1.2 (P 0.8) | + | Glaze | structs (validate_skipped), structs [P] | 312 (P 238) | 873 (P 252) | 1,304 (P 316) | 51,046 (P 41,037) | 1.4 (P 1.1) | + | sonic-rs (Rust) | Value | 340 | 700 | 1,938 | 41,203 | 1.6 | + | sonic-cpp | Document [U] | – (U 385) | – (U 992) | – (U 2,590) | – (U 46,922) | – (U 1.7) | + | simd-json (Rust) | structs (copy) | 375 | 871 | 2,660 | 57,877 | 2.0 | + | serde_json (Rust) | from_utf8 + structs, structs [U] | 483 (U 416) | 1,121 (U 1,082) | 1,532 (U 1,458) | 63,635 | 2.2 (U 1.9) | + | Boost.JSON | parse | 889 | 1,490 | 3,632 | 96,757 | 3.8 | + | RapidJSON | insitu (copy), insitu (copy) (no encoding check) [U] | 1,319 (U 703) | 1,572 (U 1,146) | 6,762 | 142,740 (U 66,763) | 6.4 (U 2.7) | + | nlohmann/json `json` | parse, structs (from_json) | 1,357 | 2,439 | 6,066 | 179,366 | 7.5 | + + **edit** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | editable | 290 | 560 | 2,742 | 58,265 | 1.9 | + | yyjson | insitu (copy) + mut copy, mut copy | 438 | 900 | 3,694 | 84,447 | 2.4 | + | sonic-cpp | Document [U] | – (U 490) | – (U 1,227) | – (U 5,655) | – (U 63,940) | – (U 2.6) | + | sonic-rs (Rust) | Value | 634 | 1,264 | 4,379 | 140,693 | 3.8 | + | simd-json (Rust) | borrowed (copy) | 934 | 2,111 | 7,695 | 111,832 | 5.3 | + | Boost.JSON | parse | 1,367 | 1,999 | 6,542 | 157,555 | 6.6 | + | nlohmann/json `json` | ordered_json, parse | 1,269 | 2,376 | 8,194 | 173,089 | 7.1 | + | Glaze | generic | 1,503 | 3,223 | 11,125 | 187,294 | 8.2 | + | RapidJSON | Document, insitu (copy), insitu (copy) (no encoding check) [U] | 1,917 (U 1,349) | 2,404 (U 1,987) | 13,880 | 224,650 (U 148,239) | 10.3 (U 6.5) | + | serde_json (Rust) | Value | 2,001 | 3,287 | 9,670 | 248,681 | 9.3 | + + **minify** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse + dump | 264 | 496 | 2,566 | 37,936 | 1.5 | + | yyjson | insitu (copy) + write, read + write | 289 | 640 | 3,213 | 50,740 | 1.6 | + | sonic-rs (Rust) | Value | 546 | 1,139 | 4,366 | 64,830 | 2.9 | + | sonic-cpp | Document + Serialize [U] | – (U 497) | – (U 1,219) | – (U 5,658) | – (U 61,948) | – (U 2.5) | + | simdjson | DOM + to_string, minify [P] | 590 (P 65.0) | 990 (P 178) | 8,949 (P 236) | 82,232 (P 5,929) | 3.7 (P 0.3) | + | simd-json (Rust) | borrowed (copy) | 959 | 2,097 | 7,743 | 107,444 | 5.4 | + | Boost.JSON | parse + serialize | 1,391 | 1,987 | 6,586 | 154,714 | 6.8 | + | RapidJSON | Document + Writer, SAX to Writer, SAX to Writer (no encoding check) [U] | 1,497 (U 1,310) | 1,797 (U 1,699) | 14,455 | 181,502 (U 167,920) | 8.0 (U 7.3) | + | nlohmann/json `json` | parse + dump | 1,592 | 2,694 | 8,280 | 200,923 | 8.5 | + | Glaze | generic, minify_json [P] | 1,488 (P 283) | 3,208 (P 740) | 11,076 (P 1,808) | 172,917 (P 39,976) | 7.8 (P 1.3) | + | serde_json (Rust) | Value | 1,999 | 3,240 | 9,748 | 227,301 | 9.2 | + + **write** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | dump | 75.2 | 136 | 1,621 | 14,846 | 0.5 | + | yyjson | write | 104 | 164 | 1,717 | 20,119 | 0.7 | + | sonic-cpp | Serialize | 111 | 231 | 3,047 | 20,342 | 0.9 | + | nlohmann/json `json` | dump | 220 | 286 | 2,240 | 30,983 | 1.2 | + | Glaze | generic | 212 | 469 | 1,692 | 34,921 | 1.3 | + | sonic-rs (Rust) | Value | 214 | 454 | 2,414 | 33,358 | 1.4 | + | serde_json (Rust) | Value | 327 | 504 | 2,257 | 49,857 | 2.0 | + | simd-json (Rust) | borrowed | 364 | 496 | 2,723 | 48,114 | 1.8 | + | simdjson | to_string | 352 | 494 | 6,770 | 54,528 | 2.5 | + | Boost.JSON | serialize | 499 | 503 | 2,868 | 62,964 | 2.8 | + | RapidJSON | Writer | 592 | 818 | 6,947 | 81,580 | 3.8 | + +??? info "Times in µs on x86-64 with GCC 16.2" + + **validate** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | accept, parse | 304 | 733 | 1,682 | 78,594 | 1.5 | + | sonic-rs (Rust) | IgnoredAny | 470 | 966 | 2,249 | 54,246 | 1.8 | + | simdjson | DOM | 302 | 705 | 3,176 | 114,180 | 1.8 | + | sonic-cpp | Document [U] | – (U 405) | – (U 935) | – (U 3,218) | – (U 95,565) | – (U 1.7) | + | yyjson | insitu (copy), read | 394 | 956 | 3,322 | 130,978 | 1.6 | + | serde_json (Rust) | IgnoredAny [U], from_utf8 + IgnoredAny | 634 (U 487) | 1,448 (U 1,370) | 2,402 (U 2,318) | 66,822 (U 59,801) | 2.4 (U 1.9) | + | Glaze | validate_json | 727 | 1,983 | 2,571 | 76,361 | 2.6 | + | Boost.JSON | SAX | 680 | 922 | 5,993 | 60,687 | 2.6 | + | simd-json (Rust) | tape (copy) | 592 | 1,426 | 4,303 | 211,716 | 2.8 | + | nlohmann/json `json` | accept | 817 | 1,614 | 4,402 | 92,387 | 4.1 | + | RapidJSON | SAX (no encoding check) [U], insitu (copy), insitu (copy) (no encoding check) [U] | 1,250 (U 1,098) | 1,910 (U 1,607) | 10,181 | 150,241 (U 143,546) | 5.3 (U 3.6) | + + **sum** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | simdjson | On-Demand | 347 | 796 | 3,476 | 92,000 | 1.9 | + | **nlohmann/json `json_document`** | parse | 383 | 932 | 3,874 | 93,197 | 2.0 | + | sonic-rs (Rust) | visitor | 494 | 1,135 | 4,580 | 59,149 | 2.4 | + | sonic-cpp | Document [U] | – (U 462) | – (U 1,125) | – (U 3,867) | – (U 106,727) | – (U 2.1) | + | yyjson | insitu (copy), read | 448 | 1,094 | 3,955 | 136,684 | 1.9 | + | Boost.JSON | SAX | 668 | 934 | 5,692 | 62,486 | 2.7 | + | nlohmann/json `json` | sax | 790 | 1,624 | 5,671 | 93,964 | 3.9 | + | simd-json (Rust) | visitor (copy) | 722 | 1,686 | 5,191 | 220,582 | 3.8 | + | serde_json (Rust) | visitor | 1,318 | 2,299 | 7,610 | 123,810 | 4.3 | + | RapidJSON | SAX (no encoding check) [U], insitu (copy), insitu (copy) (no encoding check) [U] | 1,296 (U 1,145) | 2,011 (U 1,688) | 10,601 | 170,083 (U 157,809) | 5.3 (U 3.9) | + | Glaze | generic, lazy_json [P] | 2,940 | 5,528 | 17,830 | 390,814 (P 255,217) | 12.6 (P 6.3) | + + **select** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse, structs (from_json) | 325 | 784 | 1,686 | 91,622 | 1.6 | + | simdjson | DOM, On-Demand [P] | 315 (P 202) | 754 (P 642) | 3,190 (P 907) | 129,838 (P 50,352) | 1.9 (P 1.3) | + | sonic-rs (Rust) | structs | 557 | 1,023 | 2,247 | 91,996 | 2.0 | + | sonic-cpp | Document [U] | – (U 410) | – (U 952) | – (U 3,249) | – (U 106,866) | – (U 1.8) | + | yyjson | insitu (copy) | 403 | 1,011 | 3,268 | 139,623 | 1.7 | + | Glaze | structs (validate_skipped), structs [P] | 619 (P 360) | 2,238 (P 412) | 2,544 (P 433) | 96,608 (P 74,849) | 2.1 (P 1.5) | + | serde_json (Rust) | from_utf8 + structs, structs [U] | 769 | 1,504 | 2,442 (U 2,323) | 108,386 | 3.1 (U 3.0) | + | simd-json (Rust) | structs (copy) | 730 | 1,658 | 4,915 | 266,073 | 3.6 | + | Boost.JSON | parse | 1,326 | 1,871 | 6,892 | 196,136 | 6.1 | + | RapidJSON | Document (no encoding check) [U], insitu (copy), insitu (copy) (no encoding check) [U] | 1,274 (U 1,098) | 2,060 | 10,432 | 165,343 (U 156,012) | 5.2 (U 3.7) | + | nlohmann/json `json` | parse, structs (from_json) | 3,643 | 6,199 | 11,694 | 605,646 | 14.5 | + + **edit** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | editable | 552 | 1,082 | 5,801 | 198,867 | 3.1 | + | sonic-cpp | Document [U] | – (U 629) | – (U 1,455) | – (U 8,594) | – (U 185,870) | – (U 3.5) | + | yyjson | insitu (copy) + mut copy, mut copy | 801 | 1,641 | 7,402 | 313,182 | 3.7 | + | sonic-rs (Rust) | Value | 1,189 | 2,384 | 8,007 | 413,714 | 6.6 | + | Boost.JSON | parse | 1,771 | 2,496 | 12,504 | 311,015 | 8.6 | + | RapidJSON | insitu (copy), insitu (copy) (no encoding check) [U] | 1,983 (U 1,799) | 2,859 | 19,769 | 298,015 (U 286,231) | 9.0 (U 7.5) | + | simd-json (Rust) | borrowed (copy), owned (copy) | 2,071 | 4,465 | 16,360 | 416,658 | 9.0 | + | nlohmann/json `json` | ordered_json | 3,046 | 5,087 | 15,464 | 863,465 | 13.8 | + | Glaze | generic | 3,547 | 6,080 | 22,146 | 937,712 | 15.6 | + | serde_json (Rust) | Value | 4,474 | 6,922 | 18,301 | 805,290 | 21.2 | + + **minify** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse + dump | 482 | 1,001 | 5,856 | 159,533 | 2.5 | + | yyjson | insitu (copy) + write, read + write | 658 | 1,268 | 6,934 | 210,677 | 2.9 | + | sonic-cpp | Document + Serialize [U] | – (U 633) | – (U 1,436) | – (U 8,992) | – (U 178,113) | – (U 3.3) | + | sonic-rs (Rust) | Value | 988 | 2,093 | 7,775 | 217,697 | 5.3 | + | simdjson | DOM + to_string, minify [P] | 799 (P 104) | 1,461 (P 246) | 15,173 (P 365) | 310,524 (P 47,397) | 4.7 (P 0.5) | + | Boost.JSON | parse + serialize | 1,803 | 2,480 | 13,545 | 324,721 | 8.7 | + | simd-json (Rust) | borrowed (copy) | 1,924 | 4,375 | 15,278 | 419,474 | 8.7 | + | RapidJSON | Document + Writer, SAX to Writer, SAX to Writer (no encoding check) [U] | 2,606 (U 1,820) | 2,810 (U 2,456) | 22,160 | 360,474 (U 277,281) | 13.6 (U 9.4) | + | Glaze | generic, minify_json [P] | 3,394 (P 419) | 6,016 (P 1,301) | 23,223 (P 2,832) | 512,061 (P 92,190) | 15.1 (P 1.9) | + | nlohmann/json `json` | parse + dump | 4,168 | 6,253 | 16,656 | 777,125 | 16.4 | + | serde_json (Rust) | Value | 4,081 | 6,880 | 17,249 | 615,033 | 18.4 | + + **write** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | dump | 155 | 253 | 3,899 | 69,593 | 1.0 | + | yyjson | write | 190 | 320 | 3,349 | 69,582 | 1.2 | + | sonic-cpp | Serialize | 259 | 510 | 5,269 | 76,584 | 1.5 | + | nlohmann/json `json` | dump | 433 | 607 | 3,896 | 126,529 | 1.9 | + | Glaze | generic | 367 | 688 | 4,097 | 134,165 | 1.9 | + | sonic-rs (Rust) | Value | 442 | 935 | 3,954 | 100,889 | 2.6 | + | Boost.JSON | serialize | 454 | 835 | 5,468 | 132,656 | 2.5 | + | simd-json (Rust) | borrowed | 604 | 809 | 4,825 | 110,710 | 2.7 | + | serde_json (Rust) | Value | 563 | 882 | 3,979 | 120,716 | 2.9 | + | simdjson | to_string | 471 | 712 | 11,156 | 186,861 | 2.9 | + | RapidJSON | Writer | 653 | 978 | 9,071 | 138,832 | 4.0 | + +??? info "Times in µs on x86-64 with GCC 13" + + **validate** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | accept, parse | 325 | 742 | 1,699 | 84,790 | 1.6 | + | sonic-rs (Rust) | IgnoredAny | 470 | 966 | 2,249 | 54,246 | 1.8 | + | simdjson | DOM | 328 | 810 | 3,178 | 121,064 | 1.9 | + | Glaze | validate_json | 590 | 1,399 | 1,847 | 71,293 | 2.3 | + | sonic-cpp | Document [U] | – (U 425) | – (U 1,032) | – (U 3,618) | – (U 95,772) | – (U 1.8) | + | serde_json (Rust) | IgnoredAny [U], from_utf8 + IgnoredAny | 634 (U 487) | 1,448 (U 1,370) | 2,402 (U 2,318) | 66,822 (U 59,801) | 2.4 (U 1.9) | + | yyjson | insitu (copy), read | 390 | 995 | 5,320 | 132,598 | 1.7 | + | Boost.JSON | SAX | 738 | 1,007 | 5,465 | 59,249 | 3.2 | + | simd-json (Rust) | tape (copy) | 592 | 1,426 | 4,303 | 211,716 | 2.8 | + | nlohmann/json `json` | accept | 789 | 1,631 | 4,570 | 94,289 | 4.0 | + | RapidJSON | SAX, SAX (no encoding check) [U], insitu (copy), insitu (copy) (no encoding check) [U] | 1,638 (U 1,135) | 2,230 (U 1,666) | 11,264 | 209,691 (U 157,274) | 7.3 (U 3.8) | + + **sum** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | simdjson | On-Demand | 358 | 817 | 3,407 | 90,338 | 2.0 | + | **nlohmann/json `json_document`** | parse | 405 | 945 | 4,038 | 87,781 | 2.1 | + | sonic-rs (Rust) | visitor | 494 | 1,135 | 4,580 | 59,149 | 2.4 | + | sonic-cpp | Document [U] | – (U 482) | – (U 1,234) | – (U 4,412) | – (U 105,062) | – (U 2.2) | + | yyjson | insitu (copy) | 447 | 1,148 | 5,959 | 138,001 | 2.0 | + | Boost.JSON | SAX | 753 | 1,030 | 5,688 | 61,479 | 3.2 | + | nlohmann/json `json` | sax | 807 | 1,647 | 5,962 | 100,804 | 4.1 | + | simd-json (Rust) | visitor (copy) | 722 | 1,686 | 5,191 | 220,582 | 3.8 | + | serde_json (Rust) | visitor | 1,318 | 2,299 | 7,610 | 123,810 | 4.3 | + | RapidJSON | SAX, SAX (no encoding check) [U], insitu (copy), insitu (copy) (no encoding check) [U] | 1,679 (U 1,185) | 2,388 (U 1,768) | 11,030 | 216,612 (U 161,397) | 7.4 (U 4.1) | + | Glaze | generic, lazy_json [P] | 3,206 (P 2,948) | 5,928 | 20,405 (P 16,203) | 403,975 (P 231,683) | 13.5 (P 6.0) | + + **select** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse, structs (from_json) | 347 | 763 | 1,700 | 98,540 | 1.7 | + | sonic-rs (Rust) | structs | 557 | 1,023 | 2,247 | 91,996 | 2.0 | + | simdjson | DOM, On-Demand [P] | 337 (P 211) | 837 (P 804) | 3,283 (P 1,138) | 134,701 (P 51,878) | 2.1 (P 1.4) | + | Glaze | structs (validate_skipped), structs [P] | 539 (P 348) | 1,475 (P 408) | 1,850 (P 449) | 99,194 (P 77,565) | 1.9 (P 1.5) | + | sonic-cpp | Document [U] | – (U 419) | – (U 1,044) | – (U 3,675) | – (U 111,999) | – (U 1.9) | + | yyjson | insitu (copy), read | 408 | 996 | 5,375 | 142,713 | 1.8 | + | serde_json (Rust) | from_utf8 + structs, structs [U] | 769 | 1,504 | 2,442 (U 2,323) | 108,386 | 3.1 (U 3.0) | + | simd-json (Rust) | structs (copy) | 730 | 1,658 | 4,915 | 266,073 | 3.6 | + | Boost.JSON | parse | 1,605 | 1,903 | 7,605 | 214,973 | 6.7 | + | RapidJSON | Document, Document (no encoding check) [U], insitu (copy), insitu (copy) (no encoding check) [U] | 1,779 (U 1,194) | 2,257 (U 1,923) | 12,214 | 226,825 (U 175,262) | 7.2 (U 3.9) | + | nlohmann/json `json` | parse, structs (from_json) | 3,523 | 5,534 | 12,684 | 623,070 | 13.6 | + + **edit** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | editable | 552 | 1,112 | 6,027 | 203,217 | 3.3 | + | sonic-cpp | Document [U] | – (U 663) | – (U 1,572) | – (U 8,879) | – (U 181,438) | – (U 3.6) | + | yyjson | insitu (copy) + mut copy, mut copy | 810 | 1,724 | 9,806 | 322,621 | 3.8 | + | sonic-rs (Rust) | Value | 1,189 | 2,384 | 8,007 | 413,714 | 6.6 | + | Boost.JSON | parse | 2,026 | 2,943 | 13,352 | 337,632 | 9.4 | + | simd-json (Rust) | borrowed (copy), owned (copy) | 2,071 | 4,465 | 16,360 | 416,658 | 9.0 | + | RapidJSON | Document (no encoding check) [U], insitu (copy), insitu (copy) (no encoding check) [U] | 2,511 (U 1,896) | 3,310 (U 2,942) | 20,627 | 362,717 (U 314,375) | 11.6 (U 7.9) | + | nlohmann/json `json` | ordered_json | 3,156 | 5,280 | 16,247 | 922,463 | 15.0 | + | Glaze | generic | 3,767 | 6,532 | 24,351 | 940,280 | 16.2 | + | serde_json (Rust) | Value | 4,474 | 6,922 | 18,301 | 805,290 | 21.2 | + + **minify** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse + dump | 497 | 1,028 | 5,930 | 156,014 | 2.6 | + | yyjson | insitu (copy) + write, read + write | 657 | 1,326 | 9,202 | 195,618 | 3.1 | + | sonic-cpp | Document + Serialize [U] | – (U 667) | – (U 1,568) | – (U 9,007) | – (U 174,144) | – (U 3.5) | + | sonic-rs (Rust) | Value | 988 | 2,093 | 7,775 | 217,697 | 5.3 | + | simdjson | DOM + to_string, minify [P] | 839 (P 128) | 1,588 (P 322) | 14,645 (P 469) | 292,317 (P 50,456) | 4.9 (P 0.6) | + | Boost.JSON | parse + serialize | 1,931 | 2,902 | 13,756 | 328,321 | 9.8 | + | simd-json (Rust) | borrowed (copy) | 1,924 | 4,375 | 15,278 | 419,474 | 8.7 | + | RapidJSON | Document + Writer, SAX to Writer, SAX to Writer (no encoding check) [U] | 2,963 (U 1,872) | 3,189 (U 2,490) | 21,761 | 406,899 (U 282,973) | 15.7 (U 11.1) | + | Glaze | generic, minify_json [P] | 3,647 (P 428) | 6,503 (P 1,144) | 25,082 (P 2,468) | 546,003 (P 94,867) | 16.1 (P 2.0) | + | nlohmann/json `json` | parse + dump | 3,980 | 6,495 | 17,573 | 730,814 | 16.5 | + | serde_json (Rust) | Value | 4,081 | 6,880 | 17,249 | 615,033 | 18.4 | + + **write** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | dump | 153 | 271 | 3,934 | 72,106 | 0.9 | + | yyjson | write | 216 | 331 | 3,620 | 76,733 | 1.2 | + | sonic-cpp | Serialize | 270 | 533 | 5,100 | 80,556 | 1.5 | + | Glaze | generic | 364 | 712 | 4,265 | 143,981 | 1.9 | + | nlohmann/json `json` | dump | 441 | 628 | 4,091 | 129,455 | 2.0 | + | sonic-rs (Rust) | Value | 442 | 935 | 3,954 | 100,889 | 2.6 | + | simd-json (Rust) | borrowed | 604 | 809 | 4,825 | 110,710 | 2.7 | + | serde_json (Rust) | Value | 563 | 882 | 3,979 | 120,716 | 2.9 | + | Boost.JSON | serialize | 478 | 1,015 | 5,750 | 137,840 | 2.5 | + | simdjson | to_string | 491 | 750 | 10,840 | 196,092 | 2.9 | + | RapidJSON | Writer | 746 | 1,032 | 8,773 | 150,334 | 4.3 | + +??? info "Times in µs on x86-64 with Clang 23" + + **validate** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | accept, parse | 302 | 720 | 1,784 | 81,370 | 1.5 | + | sonic-rs (Rust) | IgnoredAny | 470 | 966 | 2,249 | 54,246 | 1.8 | + | simdjson | DOM | 311 | 736 | 3,343 | 115,626 | 1.8 | + | yyjson | insitu (copy), read | 379 | 896 | 2,851 | 124,180 | 1.6 | + | sonic-cpp | Document [U] | – (U 450) | – (U 1,026) | – (U 3,140) | – (U 98,200) | – (U 2.0) | + | Glaze | validate_json | 621 | 1,402 | 1,806 | 76,164 | 2.6 | + | serde_json (Rust) | IgnoredAny [U], from_utf8 + IgnoredAny | 634 (U 487) | 1,448 (U 1,370) | 2,402 (U 2,318) | 66,822 (U 59,801) | 2.4 (U 1.9) | + | Boost.JSON | SAX | 596 | 923 | 6,234 | 56,654 | 2.4 | + | nlohmann/json `json` | accept | 746 | 1,424 | 4,201 | 100,878 | 4.1 | + | simd-json (Rust) | tape (copy) | 592 | 1,426 | 4,303 | 211,716 | 2.8 | + | RapidJSON | SAX, SAX (no encoding check) [U], insitu (copy), insitu (copy) (no encoding check) [U] | 1,845 (U 1,227) | 2,150 (U 1,665) | 11,719 | 233,417 (U 156,744) | 8.6 (U 4.3) | + + **sum** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse | 378 | 891 | 4,151 | 89,689 | 1.9 | + | simdjson | DOM, On-Demand | 399 | 946 | 4,100 | 120,056 | 2.2 | + | sonic-rs (Rust) | visitor | 494 | 1,135 | 4,580 | 59,149 | 2.4 | + | yyjson | insitu (copy), read | 435 | 1,048 | 3,467 | 135,382 | 1.9 | + | Boost.JSON | SAX | 582 | 927 | 5,935 | 56,310 | 2.4 | + | sonic-cpp | Document [U] | – (U 504) | – (U 1,180) | – (U 3,736) | – (U 110,324) | – (U 2.2) | + | nlohmann/json `json` | sax | 784 | 1,466 | 5,345 | 101,437 | 4.1 | + | simd-json (Rust) | visitor (copy) | 722 | 1,686 | 5,191 | 220,582 | 3.8 | + | serde_json (Rust) | visitor | 1,318 | 2,299 | 7,610 | 123,810 | 4.3 | + | RapidJSON | SAX, SAX (no encoding check) [U], insitu (copy), insitu (copy) (no encoding check) [U] | 1,869 (U 1,237) | 2,172 (U 1,770) | 12,183 | 253,075 (U 163,826) | 8.4 (U 4.4) | + | Glaze | generic, lazy_json [P] | 3,890 (P 2,829) | 7,282 | 25,798 (P 17,578) | 501,805 (P 223,672) | 16.7 (P 5.9) | + + **select** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse, structs (from_json) | 324 | 728 | 1,784 | 89,731 | 1.6 | + | simdjson | DOM, On-Demand [P] | 330 (P 210) | 743 (P 610) | 3,291 (P 861) | 129,470 (P 48,548) | 2.0 (P 1.3) | + | yyjson | insitu (copy), read | 387 | 900 | 2,814 | 139,634 | 1.7 | + | sonic-rs (Rust) | structs | 557 | 1,023 | 2,247 | 91,996 | 2.0 | + | Glaze | structs (validate_skipped), structs [P] | 560 (P 345) | 1,329 (P 424) | 1,780 (P 463) | 93,674 (P 76,186) | 2.2 (P 1.7) | + | sonic-cpp | Document [U] | – (U 461) | – (U 1,024) | – (U 3,030) | – (U 109,906) | – (U 2.0) | + | serde_json (Rust) | from_utf8 + structs, structs [U] | 769 | 1,504 | 2,442 (U 2,323) | 108,386 | 3.1 (U 3.0) | + | simd-json (Rust) | structs (copy) | 730 | 1,658 | 4,915 | 266,073 | 3.6 | + | Boost.JSON | parse | 1,264 | 1,659 | 7,173 | 202,456 | 5.9 | + | RapidJSON | insitu (copy), insitu (copy) (no encoding check) [U] | 1,901 (U 1,251) | 2,329 (U 1,936) | 11,814 | 251,223 (U 181,144) | 8.2 (U 4.3) | + | nlohmann/json `json` | parse, structs (from_json) | 3,654 | 5,494 | 11,583 | 641,176 | 15.2 | + + **edit** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | editable | 534 | 1,100 | 5,935 | 208,247 | 3.0 | + | sonic-cpp | Document [U] | – (U 644) | – (U 1,508) | – (U 7,972) | – (U 184,491) | – (U 3.2) | + | yyjson | insitu (copy) + mut copy, mut copy | 912 | 1,686 | 7,407 | 318,770 | 4.0 | + | sonic-rs (Rust) | Value | 1,189 | 2,384 | 8,007 | 413,714 | 6.6 | + | Boost.JSON | parse | 1,722 | 2,614 | 12,953 | 346,073 | 8.5 | + | simd-json (Rust) | borrowed (copy), owned (copy) | 2,071 | 4,465 | 16,360 | 416,658 | 9.0 | + | RapidJSON | insitu (copy), insitu (copy) (no encoding check) [U] | 2,565 (U 1,902) | 3,328 (U 2,859) | 22,449 (U 21,667) | 378,036 (U 321,177) | 11.8 (U 7.8) | + | nlohmann/json `json` | ordered_json, parse | 3,058 | 5,099 | 16,378 | 920,570 | 14.7 | + | serde_json (Rust) | Value | 4,474 | 6,922 | 18,301 | 805,290 | 21.2 | + | Glaze | generic | 4,278 | 7,989 | 30,869 | 1,095,800 | 19.5 | + + **minify** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | parse + dump | 474 | 993 | 5,445 | 153,155 | 2.4 | + | yyjson | insitu (copy) + write, read + write | 625 | 1,256 | 6,261 | 212,043 | 3.1 | + | sonic-cpp | Document + Serialize [U] | – (U 647) | – (U 1,487) | – (U 7,924) | – (U 182,940) | – (U 3.2) | + | sonic-rs (Rust) | Value | 988 | 2,093 | 7,775 | 217,697 | 5.3 | + | simdjson | DOM + to_string, minify [P] | 857 (P 103) | 1,543 (P 256) | 16,516 (P 373) | 326,881 (P 51,243) | 5.1 (P 0.5) | + | Boost.JSON | parse + serialize | 1,758 | 2,553 | 12,744 | 358,018 | 9.0 | + | simd-json (Rust) | borrowed (copy) | 1,924 | 4,375 | 15,278 | 419,474 | 8.7 | + | RapidJSON | Document + Writer, SAX to Writer, SAX to Writer (no encoding check) [U] | 2,465 (U 1,928) | 2,829 (U 2,416) | 22,132 | 374,258 (U 269,637) | 13.2 (U 9.5) | + | nlohmann/json `json` | parse + dump | 4,037 | 6,081 | 16,349 | 771,912 | 17.0 | + | serde_json (Rust) | Value | 4,081 | 6,880 | 17,249 | 615,033 | 18.4 | + | Glaze | generic, minify_json [P] | 4,215 (P 418) | 7,644 (P 1,062) | 29,762 (P 2,150) | 683,744 (P 93,265) | 18.7 (P 2.0) | + + **write** + + | library | variant | `twitter.json` | `citm_catalog.json` | `canada.json` | `jeopardy.json` | one status (2.5 KB) | + | --- | --- | --: | --: | --: | --: | --: | + | **nlohmann/json `json_document`** | dump | 152 | 272 | 3,634 | 68,840 | 0.9 | + | yyjson | write | 219 | 364 | 3,380 | 75,136 | 1.3 | + | sonic-cpp | Serialize | 231 | 475 | 4,851 | 69,344 | 1.2 | + | nlohmann/json `json` | dump | 445 | 590 | 4,523 | 118,446 | 1.9 | + | Glaze | generic | 413 | 725 | 4,239 | 137,011 | 2.1 | + | sonic-rs (Rust) | Value | 442 | 935 | 3,954 | 100,889 | 2.6 | + | Boost.JSON | serialize | 489 | 902 | 5,659 | 127,823 | 2.5 | + | simd-json (Rust) | borrowed | 604 | 809 | 4,825 | 110,710 | 2.7 | + | serde_json (Rust) | Value | 563 | 882 | 3,979 | 120,716 | 2.9 | + | simdjson | to_string | 551 | 803 | 12,977 | 183,837 | 3.2 | + | RapidJSON | Writer | 644 | 966 | 9,614 | 127,167 | 3.9 | + +### F. Behavior changes + +Visible changes that came with the speed: + +- **Float output** ([#5634][5634]). Żmij writes the shortest decimal that reads back as the same `double`, and the + closest one if there are several. Of one million random `double` bit patterns, 1,425 (0.14 %) are now written + differently: 810 with fewer digits (`5.3165205877497296e+16` becomes `5.31652058774973e+16`), 615 with the same + number of digits but the closer ones. They all read back as the same `double`, and none of one million short + decimals changes. In `canada.json`, 69 of the 111,126 numbers come out differently. +- **Error positions** ([#5283][5283]). The column reported after a number at the end of a line is now correct; the + fast paths otherwise report the same byte, line and column as 3.12.0, checked on 481,000 documents. +- **SAX float text** ([#5852][5852]). The built-in handlers behind `parse()` and `accept()` get an empty string as + the text of a float token. A user-written SAX handler still gets the token's text. +- **`FILE*` locking** ([#5828][5828]). The lock is taken once and held for the whole parse instead of once per byte. + The documentation mentions it, and an opt-out macro restores the old behavior. + +### G. How we measured + +**What is compared.** "3.12.0" is the released single header and "3.13.0" the released one. Both are compiled from the +*same* benchmark source, the Google Benchmark suite in +[`tests/benchmarks`](https://github.com/nlohmann/json/tree/develop/tests/benchmarks), with the BON8 benchmarks +removed because 3.12.0 has no BON8. + +| | | +| --- | --- | +| machine | Apple M1 Max laptop on AC power, macOS 27.0.1 | +| compiler | Apple clang 21, libc++ | +| flags | `-O3 -flto -DNDEBUG`, the compiler's default standard, C++14 | +| suite | 2 rounds × 4 repetitions per version, random interleaving, each round started only when the load average was below 4; the median of all 8 | +| noise | the coefficient of variation was 3 % or less for 176 of the 182 rows with 3.12.0 and 178 with 3.13.0; the largest was 12 % | +| inputs | the files of [Appendix A](#a-test-files), and number-heavy files | + +

Setup of the Google Benchmark comparison of 3.12.0 and 3.13.0.

+ +**The other measurements.** The timeline is +[`tests/benchmarks/history`](https://github.com/nlohmann/json/tree/develop/tests/benchmarks/history): one program, +compiled against `single_include` of 3.12.0, of each of the 315 commits on `develop` that changed `json.hpp` or +`json_view.hpp` since, and of 3.13.0 (C++17, `-O3`, no LTO), 4 rounds in random order, median of the rounds. The +algorithmic fixes come from small extra programs (C++17, `-O3`, median of 3 interleaved runs). The comparison with +other libraries is described in [Appendix E](#e-comparison-with-other-libraries). + +**Compile times.** The two programs of [The price](#the-price), each compiled as one translation unit with +`-std=c++20` (modules need it) and `-O0` or `-O2`, with Apple clang 21 and Homebrew GCC 16.2 on the M1 Max. The time is +the CPU time (user plus system) of the compiler process, the median of 9 rounds in which all 40 compilations ran in a +random order. The machine had other work running (load average 5 to 12), which CPU time is less sensitive to than wall +time; the slowest of the 9 runs was within 18 % of the fastest for every program, and within 30 % for building the +precompiled header with GCC. Every variant was also linked +and run once, with the same output from all of them. + +| build | program | 3.12.0 | 3.13.0 | 3.13.0, PCH | 3.13.0, module | +| --- | --- | --: | --: | --: | --: | +| Apple clang `-O0` | `count_numbers` | 959 | 1,155 | 679 | 804 | +| | `server_config` | 1,108 | 1,445 | 763 | 1,057 | +| Apple clang `-O2` | `count_numbers` | 1,269 | 1,868 | 1,364 | 1,513 | +| | `server_config` | 1,577 | 2,354 | 1,749 | 2,141 | +| GCC 16 `-O0` | `count_numbers` | 1,444 | 2,346 | 1,579 | 1,662 | +| | `server_config` | 1,985 | 2,782 | 2,113 | 2,181 | +| GCC 16 `-O2` | `count_numbers` | 2,327 | 3,453 | 2,972 | 2,895 | +| | `server_config` | 2,889 | 4,389 | 3,942 | 3,826 | + +

Compile time in milliseconds of the two programs in [The price](#the-price) (CPU time of the compiler, median of 9 runs). Building the precompiled header took 876 and 931 ms with Apple clang (`-O0`, `-O2`) and 2,302 and 2,323 ms with GCC; building the module took 1,406 and 1,541 ms or 2,420 and 2,392 ms.

+ +??? example "The programs and the build commands" + + ```cpp + // Reads a JSON file and adds up all of its numbers (the "sum" use case of the benchmark). + #include + #include + #include + #ifdef USE_MODULE + import nlohmann.json; + #else + #include + #endif + + using nlohmann::json; + + static double sum_numbers(const json& j) + { + switch (j.type()) + { + case json::value_t::array: + case json::value_t::object: + { + double sum = 0; + for (const auto& element : j) + { + sum += sum_numbers(element); + } + return sum; + } + case json::value_t::number_integer: + case json::value_t::number_unsigned: + case json::value_t::number_float: + return j.get(); + default: + return 0; + } + } + + int main(int argc, char* argv[]) + { + if (argc != 2) + { + return 1; + } + std::ifstream in(argv[1]); + const json j = json::parse(in); + std::cout << sum_numbers(j) << '\n'; + } + ``` + +

`count_numbers.cpp`.

+ + ```cpp + // Reads a configuration file into a struct, changes it, and writes it back indented. + #include + #include + #include + #include + #ifdef USE_MODULE + import nlohmann.json; + #else + #include + #endif + + using nlohmann::json; + + struct server_config + { + std::string host; + int port = 0; + double timeout = 0; + std::vector tags; + }; + + void to_json(json& j, const server_config& c) + { + j = json{{"host", c.host}, {"port", c.port}, {"timeout", c.timeout}, {"tags", c.tags}}; + } + + void from_json(const json& j, server_config& c) + { + j.at("host").get_to(c.host); + j.at("port").get_to(c.port); + j.at("timeout").get_to(c.timeout); + j.at("tags").get_to(c.tags); + } + + int main(int argc, char* argv[]) + { + if (argc != 3) + { + return 1; + } + std::ifstream in(argv[1]); + auto config = json::parse(in).get(); + config.port += 1; + config.tags.push_back("updated"); + std::ofstream(argv[2]) << json(config).dump(2) << '\n'; + } + ``` + +

`server_config.cpp`.

+ + ```sh + # Apple clang: the precompiled header (pch.hpp contains only #include ) ... + clang++ -std=c++20 -O2 -I single_include -x c++-header pch.hpp -o pch.hpp.pch + clang++ -std=c++20 -O2 -I single_include -include-pch pch.hpp.pch -c count_numbers.cpp + # ... and the module + clang++ -std=c++20 -O2 -fcxx-modules -I single_include -c -x c++-module src/modules/json.cppm \ + -fmodule-output=nlohmann.json.pcm -o json_mod.o + clang++ -std=c++20 -O2 -fcxx-modules -fmodule-file=nlohmann.json=nlohmann.json.pcm -DUSE_MODULE \ + -c count_numbers.cpp + + # GCC 16 (Homebrew on macOS, add --sysroot=$(xcrun --show-sdk-path)) + g++-16 -std=c++20 -O2 -I single_include -x c++-header pch.hpp -o pch.hpp.gch + g++-16 -std=c++20 -O2 -I single_include -include pch.hpp -Winvalid-pch -c count_numbers.cpp + g++-16 -std=c++20 -O2 -fmodules -I single_include -c src/modules/json.cppm -o json_mod.o + g++-16 -std=c++20 -O2 -fmodules -DUSE_MODULE -c count_numbers.cpp + ``` + +

The commands for one program at `-O2`; the module variants are linked with `json_mod.o`.

+ +**What we did not measure.** The suite, the timeline and the algorithmic fixes ran on one Apple silicon laptop with +Clang. The comparison with other libraries also ran on an x86-64 Haswell server with GCC 16.2, GCC 13 and Clang 23, and +on the Mac with GCC 16.2 and Clang 23 as a check; that server shares its cores with other work, so its differences of +a few percent are noise. The theme sections quote x86-64 numbers where a pull request measured them, mostly with GCC +13 and Clang 18. Expect smaller gains for some workloads on x86-64 with glibc: its `FILE*` +locking is cheaper to begin with, and its allocator behaves differently. We did not measure on Windows, and we did not +measure binary size or memory use. + +### H. Pull requests by theme + +- 1 **Specialize for each input:** contiguous input [#5283][5283]; streams and `FILE*` [#5828][5828], [#5884][5884]; binary strings in bulk [#5233][5233]. +- 2 **Work on words, not bytes:** word-at-a-time strings, UTF-8 runs and digits [#5283][5283], [#5738][5738], + [#5851][5851]; indentation [#5810][5810]; `dump()` runs [#5285][5285]; SSE2 and NEON [#5853][5853], + [#5628][5628]; `json_document` with `ensure_ascii` [#5879][5879]; short strings [#5878][5878], [#5883][5883]; + escape table [#5822][5822]; loop shape [#5490][5490]. +- 3 **Own the number conversions:** Eisel-Lemire [#5617][5617]; long numbers [#5738][5738]; one pass over the + digits [#5851][5851]; Żmij [#5634][5634]; MSVC intrinsics for the 128-bit multiplication [#5782][5782]. +- 4 **Don't do unnecessary work:** float token text [#5852][5852]; token buffer [#5234][5234], [#5828][5828]; + positions on error [#5809][5809]; + binary readers' copy [#5501][5501]; `ordered_json` growth [#5609][5609]; arrays at their final size + [#5882][5882]; moving keys [#5458][5458], [#5855][5855]; separator check [#5592][5592]; CBOR keys [#5328][5328]. +- 5 **Read the assembly:** stack canary [#5854][5854]; exceptions and inlining [#5838][5838], [#5840][5840], + [#5839][5839], [#5836][5836]; aliasing [#5633][5633]; forced inlining [#5878][5878]; branch-free selections + [#5908][5908]; code size [#5902][5902]. +- 6 **Write through a cursor:** write buffer [#5285][5285]; adapter on the stack [#5449][5449]; binary sinks + [#5286][5286]; cursor and runs of numbers [#5824][5824], [#5885][5885]. +- 7 **Fix the algorithm first:** `diff()` [#5461][5461]; parse callbacks [#5457][5457]; `operator<` [#5390][5390]; + `flatten()` [#5834][5834]; `to_bson()` [#5553][5553]; `JSON_DIAGNOSTICS` [#5832][5832]; bounded recursion + [#5285][5285], [#5389][5389], [#5547][5547]; destructor [#5762][5762], [#5835][5835]. +- 8 **Build a different data structure:** `json_document` [#5620][5620], [#5627][5627], [#5628][5628], + [#5622][5622], [#5908][5908], [#5879][5879]; editing [#5630][5630], [#5888][5888], [#5919][5919], [#5926][5926]. +- **Validation:** guard pages [#5826][5826]; differential fuzzing [#5827][5827]; float checks + [#5617][5617], [#5908][5908]; mutation checks [#5878][5878]. +- **The UTF-8 check that came and went:** [#5185][5185], [#5741][5741], [#5746][5746]. + +### I. Details of the themes + +**Eisel-Lemire (theme 3).** [fast_float](https://github.com/fastfloat/fast_float)'s `compute_float`, which 3.13.0 +adapts, works with integers only. The value is `w · 10^q = w · 5^q · 2^q`, so it normalizes `w` to 64 significant +bits, multiplies it with a 128-bit approximation of `5^q` from a table of 651 entries, and takes the 53 bits of the mantissa plus one rounding +bit from the top of the product. The binary exponent comes from a fixed-point `log2(10)`. If the nine bits below the +rounding bit are all ones, the truncated part of the table entry could still carry into the result; then a second +multiplication with the next 64 bits of `5^q` decides, which happens for about one input in 512. Mushtak and Lemire +showed in 2023 that for up to 19 digits these 128 bits always suffice, so the algorithm needs no fallback. Exact ties +between two `double`s, the only place where rounding half to even matters, can only occur for small exponents, and +are handled there. (Clinger's fast path, by contrast, uses the floating-point unit and assumes the default rounding +mode, as `strtod`'s results do in practice.) + +Numbers with more than 19 digits are rare in JSON. For them, Eisel-Lemire runs on the first 19 digits, `w`, and on +`w + 1`: the true value lies between the two, so if both give the same `double`, that is the answer. Only if they +differ does fast_float's digit comparison build the exact midpoint between the two candidates as a big integer and +compare all digits with it. + +**Żmij's digits (theme 3).** Żmij's digit conversion, by Xiang JunBo, is the same divide-by-multiplying idea as the +parser's, run backwards on all lanes of a word at once: + +```cpp +// 12345678 -> the bytes 1, 2, 3, 4, 5, 6, 7, 8 (one digit per byte) +std::uint64_t eight_digit_bytes(std::uint64_t abcdefgh) noexcept +{ + // x / d as (x * (2^k / d + 1)) >> k + const std::uint64_t abcd = (abcdefgh * (((1ull << 40) / 10000) + 1)) >> 40; + const std::uint64_t abcd_efgh = abcdefgh + ((1ull << 32) - 10000) * abcd; + const std::uint64_t ab_ef = ((abcd_efgh * (((1ull << 19) / 100) + 1)) >> 19) & 0x7F0000007Full; + const std::uint64_t ab_cd_ef_gh = abcd_efgh + ((1ull << 16) - 100) * ab_ef; + const std::uint64_t a_c_e_g = + ((ab_cd_ef_gh * (((1ull << 10) / 10) + 1)) >> 10) & 0x000F000F000F000Full; + return ab_cd_ef_gh + ((1ull << 8) - 10) * a_c_e_g; +} +``` + +

Żmij's conversion of an eight-digit number to one digit per byte, in three steps of divide-by-multiplying.

+ +`(x · ⌈2^k / d⌉) >> k` is `x / d` for the range that occurs, and `x + (2^w − d) · (x / d)` rewrites `x` as +`(x / d) · 2^w + x mod d`: the quotient moves up into the next lane. Three steps split 8 digits into 4 + 4, 2 + 2 + 2 + +2, and single digits. A zero digit becomes a zero byte, so leading and trailing zeros are counted with a count of +leading or trailing zero bits instead of divisions. + +**The destructor's walk (theme 7).** While the destructor's walk empties a container, the slot of that container's +last child holds the link back to the container's parent: + +```cpp +// descend into the last child of cur, reversing the link +basic_json& slot = last_child(cur); +take(tmp, slot); // the child's contents +take(slot, prev); // its slot now remembers cur's parent +take(prev, cur); // cur becomes the parent +take(cur, tmp); // the child becomes cur +// on the way up: read the parent back out of prev's last slot, pop that slot, free cur +``` + +

One step down in the destructor's walk: the emptied slot remembers the way back.

+ +`take()` moves the 16 bytes of type and value and leaves a null behind. The way back needs no memory: the slot that +holds the link is the one being emptied, it stays the last child until the walk comes back up, and only then, after +the link is taken out, is it removed. A child is removed only when it is a scalar or an empty container, so each +removal destroys one level at most. + +### J. Validation + +A faster path is only useful if it gives the same result as the slow one, including the same error at the same byte. +These are the checks behind the themes: + +- **Error positions** (theme 1). The contiguous fast paths defer to the byte path on anything malformed. On 481,000 + documents, 298,333 of them with errors, the contiguous and the byte path reported the same exception, message, byte, + line and column, except for the one deliberate correction listed in [Appendix F](#f-behavior-changes). +- **Stream windows** (theme 1). A test `streambuf` hands out get areas of 1 to 4,096 bytes, so that every token + crosses a window edge at every offset, and the result is compared with a `streambuf` without a get area, which + takes the old path. +- **Differential fuzzing of the input kinds.** Every fuzz input is also parsed from an `std::istringstream`, from + `std::list` iterators (the byte path) and from a `FILE*`, and the value, the exception id, the message and the byte + offset must be identical ([#5827][5827]). +- **Guard pages.** The input is copied so that its last byte is the last readable byte of a page, and the next page + is unmapped. AddressSanitizer misses an over-read into the slack of the same heap allocation, and fuzzers rarely end + an input exactly at a page boundary; this test crashes on any over-read by one byte ([#5826][5826]). +- **Number conversion** (theme 3). 6.5 million float tokens were compared with `strtod`, among them 60,000 exact + halfway cases, and 900,000 hard cases from other test suites: all bit-identical. `json_document`'s batched float + output is byte-identical to the general writer for 10⁹ generated tokens. +- **Unchanged output.** For this post, we checked that 3.13.0 writes the same bytes as 3.12.0 in all five binary + formats for 39 test files, and the same JSON text for `twitter.json` and `citm_catalog.json`. The changes of float + output are listed in [Appendix F](#f-behavior-changes). +- **Comparison** (theme 7). The single-pass `operator<` was compared with the old code on 68,121 pairs of values. +- **Mutation checks.** Break a fast path on purpose (skip one byte too many, mark `"` as copyable) and make sure the + tests notice. Marking the quote as copyable in the short-string table fails 4,551 assertions. +- **The comparison with other libraries.** Before anything is timed, every way's result is checked: the same values, + the same string bytes, the same sum of all numbers to the last bit, and an output that reads back as the expected + document ([Appendix E](#e-comparison-with-other-libraries)). + [5185]: https://github.com/nlohmann/json/pull/5185 +[5233]: https://github.com/nlohmann/json/pull/5233 [5234]: https://github.com/nlohmann/json/pull/5234 [5283]: https://github.com/nlohmann/json/pull/5283 [5285]: https://github.com/nlohmann/json/pull/5285 @@ -903,8 +2467,10 @@ object keys ([#5328][5328]). [5622]: https://github.com/nlohmann/json/pull/5622 [5627]: https://github.com/nlohmann/json/pull/5627 [5628]: https://github.com/nlohmann/json/pull/5628 +[5630]: https://github.com/nlohmann/json/pull/5630 [5633]: https://github.com/nlohmann/json/pull/5633 [5634]: https://github.com/nlohmann/json/pull/5634 +[5660]: https://github.com/nlohmann/json/issues/5660 [5738]: https://github.com/nlohmann/json/pull/5738 [5741]: https://github.com/nlohmann/json/pull/5741 [5746]: https://github.com/nlohmann/json/pull/5746 @@ -935,11 +2501,8 @@ object keys ([#5328][5328]). [5883]: https://github.com/nlohmann/json/pull/5883 [5884]: https://github.com/nlohmann/json/pull/5884 [5885]: https://github.com/nlohmann/json/pull/5885 -[5890]: https://github.com/nlohmann/json/pull/5890 +[5888]: https://github.com/nlohmann/json/pull/5888 [5902]: https://github.com/nlohmann/json/pull/5902 [5908]: https://github.com/nlohmann/json/pull/5908 -[5914]: https://github.com/nlohmann/json/pull/5914 +[5919]: https://github.com/nlohmann/json/pull/5919 [5926]: https://github.com/nlohmann/json/pull/5926 -[5936]: https://github.com/nlohmann/json/pull/5936 -[5945]: https://github.com/nlohmann/json/pull/5945 -[5947]: https://github.com/nlohmann/json/pull/5947 diff --git a/docs/mkdocs/docs/images/perf_blog_cliffs.svg b/docs/mkdocs/docs/images/perf_blog_cliffs.svg index 9aa5969cf..931f324ec 100644 --- a/docs/mkdocs/docs/images/perf_blog_cliffs.svg +++ b/docs/mkdocs/docs/images/perf_blog_cliffs.svg @@ -1,6 +1,6 @@ Operations that grew quadratically or worse: time with 3.12.0 and 3.13.0, log scale -Dot plot on a logarithmic time axis, less is better; an arrow leads from each 3.12.0 time to the 3.13.0 time. diff() 64k numbers vs []: 4102 ms to 9.98 ms; diff() 20k objects vs half: 119 ms to 3.85 ms; parse() callback, 32k objects: 1334 ms to 11.5 ms; < nested 24 deep: 62.6 ms to 0.002 ms; < citm, 10x: 274 ms to 3.81 ms; flatten() citm, ordered_json: 253 ms to 1.37 ms; to_bson() 200 deep, 100x: 19.5 ms to 0.566 ms; push_back() 100k, diagnostics: 1514 ms to 4.98 ms; at(i) 10k, diagnostics: 43.2 ms to 0.081 ms. +Dot plot on a logarithmic time axis, less is better; an arrow leads from each 3.12.0 time to the 3.13.0 time. diff() 64k numbers vs []: 4102 ms to 9.98 ms; diff() 20k objects vs half: 119 ms to 3.85 ms; parse() callback, 32k objects: 1334 ms to 11.5 ms; operator< nested 24 deep: 62.6 ms to 0.002 ms; operator< citm, 10x: 274 ms to 3.81 ms; flatten() citm, ordered_json: 253 ms to 1.37 ms; to_bson() 200 deep, 100x: 19.5 ms to 0.566 ms; push_back() 100k, diagnostics: 1514 ms to 4.98 ms; at(i) 10k, diagnostics: 43.2 ms to 0.081 ms. 1 µs @@ -36,15 +36,15 @@ parse() callback, 32k objects, 3.12.0: 1334 ms parse() callback, 32k objects, 3.13.0: 11.5 ms 116× -< nested 24 deep +operator< nested 24 deep -< nested 24 deep, 3.12.0: 62.6 ms -< nested 24 deep, 3.13.0: 0.002 ms +operator< nested 24 deep, 3.12.0: 62.6 ms +operator< nested 24 deep, 3.13.0: 0.002 ms 31300× -< citm, 10x +operator< citm, 10x -< citm, 10x, 3.12.0: 274 ms -< citm, 10x, 3.13.0: 3.81 ms +operator< citm, 10x, 3.12.0: 274 ms +operator< citm, 10x, 3.13.0: 3.81 ms 72× flatten() citm, ordered_json diff --git a/docs/mkdocs/docs/images/perf_blog_distribution.svg b/docs/mkdocs/docs/images/perf_blog_distribution.svg new file mode 100644 index 000000000..e55dd7527 --- /dev/null +++ b/docs/mkdocs/docs/images/perf_blog_distribution.svg @@ -0,0 +1,36 @@ + +Speedup of 3.13.0 over 3.12.0 for all 182 benchmarks of the suite +Bars counting the benchmarks per speedup range: below 1x: 2; 1 to 1.5x: 23; 1.5 to 2x: 17; 2 to 3x: 57; 3 to 5x: 54; 5 to 10x: 24; 10x or more: 5. Median 2.9x, geometric mean 2.9x. + +0 + +20 + +40 + +60 +below 1×: 2 +2 +below 1× +1 to 1.5×: 23 +23 +1 to 1.5× +1.5 to 2×: 17 +17 +1.5 to 2× +2 to 3×: 57 +57 +2 to 3× +3 to 5×: 54 +54 +3 to 5× +5 to 10×: 24 +24 +5 to 10× +10× or more: 5 +5 +10× or more + +speedup over 3.12.0, more is better +number of benchmarks + diff --git a/docs/mkdocs/docs/images/perf_blog_overview.svg b/docs/mkdocs/docs/images/perf_blog_overview.svg index 929300a31..47e1ab879 100644 --- a/docs/mkdocs/docs/images/perf_blog_overview.svg +++ b/docs/mkdocs/docs/images/perf_blog_overview.svg @@ -1,87 +1,87 @@ - + Speedup of 3.13.0 over 3.12.0 per workload, Apple M1 Max, Apple clang Horizontal bars of the speedup, more is better. twitter.json 3.0x; citm_catalog.json 4.1x; canada.json 3.5x; canada.json, indented 6.7x; citm, ordered_json 6.6x; twitter, std::ifstream 2.5x; citm, FILE* 4.8x; citm, accept() 7.0x; dump() twitter 6.7x; dump() canada 3.0x; dump(4) citm 4.6x; to_cbor() twitter 4.5x; twitter, memory 3.1x; twitter, FILE* 6.3x; diff() canada 10x; iterate canada 2.7x; copy + destroy citm 1.11x; == citm 1.04x. -Parsing -Writing -Reading C​BOR -Values - -1× - -2× - -3× - -4× - -5× - -6× - -7× - -8× - -9× - -10× - -11× -twitter.json -twitter.json: 3.0× -3.0× -citm_catalog.json -citm_catalog.json: 4.1× -4.1× -canada.json -canada.json: 3.5× -3.5× -canada.json, indented -canada.json, indented: 6.7× -6.7× -citm, ordered_json -citm, ordered_json: 6.6× -6.6× -twitter, std::ifstream -twitter, std::ifstream: 2.5× -2.5× -citm, FILE* -citm, FILE*: 4.8× -4.8× -citm, accept() -citm, accept(): 7.0× -7.0× -dump() twitter -dump() twitter: 6.7× -6.7× -dump() canada -dump() canada: 3.0× -3.0× -dump(4) citm -dump(4) citm: 4.6× -4.6× -to_cbor() twitter -to_cbor() twitter: 4.5× -4.5× -twitter, memory -twitter, memory: 3.1× -3.1× -twitter, FILE* -twitter, FILE*: 6.3× -6.3× -diff() canada -diff() canada: 10× -10× -iterate canada -iterate canada: 2.7× -2.7× -copy + destroy citm -copy + destroy citm: 1.11× -1.11× -== citm -== citm: 1.04× -1.04× - - -speedup over 3.12.0, more is better (the line at 1× is 3.12.0) +Parsing +Writing +Reading C​BOR +Values + +1× + +2× + +3× + +4× + +5× + +6× + +7× + +8× + +9× + +10× + +11× +twitter.json +twitter.json: 3.0× +3.0× +citm_catalog.json +citm_catalog.json: 4.1× +4.1× +canada.json +canada.json: 3.5× +3.5× +canada.json, indented +canada.json, indented: 6.7× +6.7× +citm, ordered_json +citm, ordered_json: 6.6× +6.6× +twitter, std::ifstream +twitter, std::ifstream: 2.5× +2.5× +citm, FILE* +citm, FILE*: 4.8× +4.8× +citm, accept() +citm, accept(): 7.0× +7.0× +dump() twitter +dump() twitter: 6.7× +6.7× +dump() canada +dump() canada: 3.0× +3.0× +dump(4) citm +dump(4) citm: 4.6× +4.6× +to_cbor() twitter +to_cbor() twitter: 4.5× +4.5× +twitter, memory +twitter, memory: 3.1× +3.1× +twitter, FILE* +twitter, FILE*: 6.3× +6.3× +diff() canada +diff() canada: 10× +10× +iterate canada +iterate canada: 2.7× +2.7× +copy + destroy citm +copy + destroy citm: 1.11× +1.11× +== citm +== citm: 1.04× +1.04× + + +speedup over 3.12.0 (3.12.0 = 1×), more is better diff --git a/docs/mkdocs/docs/images/perf_blog_price.svg b/docs/mkdocs/docs/images/perf_blog_price.svg new file mode 100644 index 000000000..20f507c86 --- /dev/null +++ b/docs/mkdocs/docs/images/perf_blog_price.svg @@ -0,0 +1,99 @@ + +Compile time of two programs with 3.13.0, alone, with a precompiled header and as a module, compared with 3.12.0 +Horizontal bars of the change in compile time against 3.12.0, less is better. Apple clang 21, -O0 (debug), count_numbers, 3.13.0: +20 %; Apple clang 21, -O0 (debug), count_numbers, 3.13.0, precompiled header: -29 %; Apple clang 21, -O0 (debug), count_numbers, 3.13.0, module: -16 %; Apple clang 21, -O0 (debug), server_config, 3.13.0: +30 %; Apple clang 21, -O0 (debug), server_config, 3.13.0, precompiled header: -31 %; Apple clang 21, -O0 (debug), server_config, 3.13.0, module: -5 %; Apple clang 21, -O2, count_numbers, 3.13.0: +47 %; Apple clang 21, -O2, count_numbers, 3.13.0, precompiled header: +8 %; Apple clang 21, -O2, count_numbers, 3.13.0, module: +19 %; Apple clang 21, -O2, server_config, 3.13.0: +49 %; Apple clang 21, -O2, server_config, 3.13.0, precompiled header: +11 %; Apple clang 21, -O2, server_config, 3.13.0, module: +36 %; G​CC 16, -O0 (debug), count_numbers, 3.13.0: +63 %; G​CC 16, -O0 (debug), count_numbers, 3.13.0, precompiled header: +9 %; G​CC 16, -O0 (debug), count_numbers, 3.13.0, module: +15 %; G​CC 16, -O0 (debug), server_config, 3.13.0: +40 %; G​CC 16, -O0 (debug), server_config, 3.13.0, precompiled header: +6 %; G​CC 16, -O0 (debug), server_config, 3.13.0, module: +10 %; G​CC 16, -O2, count_numbers, 3.13.0: +48 %; G​CC 16, -O2, count_numbers, 3.13.0, precompiled header: +28 %; G​CC 16, -O2, count_numbers, 3.13.0, module: +24 %; G​CC 16, -O2, server_config, 3.13.0: +52 %; G​CC 16, -O2, server_config, 3.13.0, precompiled header: +36 %; G​CC 16, -O2, server_config, 3.13.0, module: +32 %. + +3.13.0 + +3.13.0, precompiled header + +3.13.0, module +as fast as 3.12.0 +Apple clang 21, -O0 (debug) + + + + + +count_numbers +count_numbers, Apple clang 21, -O0 (debug), 3.13.0: 1,155 ms against 959 ms with 3.12.0 (+20 %) ++20 % +count_numbers, Apple clang 21, -O0 (debug), 3.13.0, precompiled header: 679 ms against 959 ms with 3.12.0 (−29 %) +−29 % +count_numbers, Apple clang 21, -O0 (debug), 3.13.0, module: 804 ms against 959 ms with 3.12.0 (−16 %) +−16 % +server_config +server_config, Apple clang 21, -O0 (debug), 3.13.0: 1,445 ms against 1,108 ms with 3.12.0 (+30 %) ++30 % +server_config, Apple clang 21, -O0 (debug), 3.13.0, precompiled header: 763 ms against 1,108 ms with 3.12.0 (−31 %) +−31 % +server_config, Apple clang 21, -O0 (debug), 3.13.0, module: 1,057 ms against 1,108 ms with 3.12.0 (−5 %) +−5 % +Apple clang 21, -O2 + + + + + +count_numbers +count_numbers, Apple clang 21, -O2, 3.13.0: 1,868 ms against 1,269 ms with 3.12.0 (+47 %) ++47 % +count_numbers, Apple clang 21, -O2, 3.13.0, precompiled header: 1,364 ms against 1,269 ms with 3.12.0 (+8 %) ++8 % +count_numbers, Apple clang 21, -O2, 3.13.0, module: 1,513 ms against 1,269 ms with 3.12.0 (+19 %) ++19 % +server_config +server_config, Apple clang 21, -O2, 3.13.0: 2,354 ms against 1,577 ms with 3.12.0 (+49 %) ++49 % +server_config, Apple clang 21, -O2, 3.13.0, precompiled header: 1,749 ms against 1,577 ms with 3.12.0 (+11 %) ++11 % +server_config, Apple clang 21, -O2, 3.13.0, module: 2,141 ms against 1,577 ms with 3.12.0 (+36 %) ++36 % +G​CC 16, -O0 (debug) + + + + + +count_numbers +count_numbers, G​CC 16, -O0 (debug), 3.13.0: 2,346 ms against 1,444 ms with 3.12.0 (+63 %) ++63 % +count_numbers, G​CC 16, -O0 (debug), 3.13.0, precompiled header: 1,579 ms against 1,444 ms with 3.12.0 (+9 %) ++9 % +count_numbers, G​CC 16, -O0 (debug), 3.13.0, module: 1,662 ms against 1,444 ms with 3.12.0 (+15 %) ++15 % +server_config +server_config, G​CC 16, -O0 (debug), 3.13.0: 2,782 ms against 1,985 ms with 3.12.0 (+40 %) ++40 % +server_config, G​CC 16, -O0 (debug), 3.13.0, precompiled header: 2,113 ms against 1,985 ms with 3.12.0 (+6 %) ++6 % +server_config, G​CC 16, -O0 (debug), 3.13.0, module: 2,181 ms against 1,985 ms with 3.12.0 (+10 %) ++10 % +G​CC 16, -O2 + + + + + +count_numbers +count_numbers, G​CC 16, -O2, 3.13.0: 3,453 ms against 2,327 ms with 3.12.0 (+48 %) ++48 % +count_numbers, G​CC 16, -O2, 3.13.0, precompiled header: 2,972 ms against 2,327 ms with 3.12.0 (+28 %) ++28 % +count_numbers, G​CC 16, -O2, 3.13.0, module: 2,895 ms against 2,327 ms with 3.12.0 (+24 %) ++24 % +server_config +server_config, G​CC 16, -O2, 3.13.0: 4,389 ms against 2,889 ms with 3.12.0 (+52 %) ++52 % +server_config, G​CC 16, -O2, 3.13.0, precompiled header: 3,942 ms against 2,889 ms with 3.12.0 (+36 %) ++36 % +server_config, G​CC 16, -O2, 3.13.0, module: 3,826 ms against 2,889 ms with 3.12.0 (+32 %) ++32 % + +−40 % +−20 % +0 ++20 % ++40 % ++60 % +compile time compared with 3.12.0, less is better + diff --git a/docs/mkdocs/docs/images/perf_blog_timeline_accept_twitter.svg b/docs/mkdocs/docs/images/perf_blog_timeline_accept_twitter.svg index eb3b63952..26c9461b9 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_accept_twitter.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_accept_twitter.svg @@ -1,38 +1,45 @@ accept() twitter.json: speedup over 3.12.0 by commit -accept() twitter.json: speedup over 3.12.0 at each of 317 commits, ending at 5.0x. Labeled steps: #5234, #5283, #5592, #5809, #5810, #5853. +accept() twitter.json: speedup over 3.12.0 at each of 317 commits, ending at 5.0x. Labeled steps, by theme: 4, 1, 4, 4, 2, 2. accept() twitter.json 1× - -2× - -4× - -8× + +2× + +4× + +8× 3.12.0 Sep 2026 Oct - -#5234: 1.22× - -#5234 -#5283: 2.6× - -#5283 -#5592: 2.9× - -#5592 -#5809: 3.7× -#5810: 4.0× - -#5809, #5810 -#5853: 4.9× - -#5853 + +#5234: 1.22× + + +4 +#5283: 2.6× + + +1 +#5592: 2.9× + + +4 +#5809: 3.7× +#5810: 4.0× + + +4 + +2 +#5853: 4.9× + + +2 speedup over 3.12.0 (log scale), more is better diff --git a/docs/mkdocs/docs/images/perf_blog_timeline_dump_canada.svg b/docs/mkdocs/docs/images/perf_blog_timeline_dump_canada.svg index 05694e9f0..5e3289709 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_dump_canada.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_dump_canada.svg @@ -1,28 +1,30 @@ dump() canada.json: speedup over 3.12.0 by commit -dump() canada.json: speedup over 3.12.0 at each of 317 commits, ending at 3.3x. Labeled steps: #5285, #5634. +dump() canada.json: speedup over 3.12.0 at each of 317 commits, ending at 3.3x. Labeled steps, by theme: 6, 3. dump() canada.json 1× - -2× - -4× - -8× + +2× + +4× + +8× 3.12.0 Sep 2026 Oct - -#5285: 1.09× - -#5285 -#5634: 3.1× - -#5634 + +#5285: 1.09× + + +6 +#5634: 3.1× + + +3 speedup over 3.12.0 (log scale), more is better diff --git a/docs/mkdocs/docs/images/perf_blog_timeline_dump_twitter.svg b/docs/mkdocs/docs/images/perf_blog_timeline_dump_twitter.svg index 7c2b77cdd..69179234b 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_dump_twitter.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_dump_twitter.svg @@ -1,36 +1,40 @@ dump() twitter.json: speedup over 3.12.0 by commit -dump() twitter.json: speedup over 3.12.0 at each of 317 commits, ending at 6.7x. Labeled steps: #5285, #5738, #5878, #5883. +dump() twitter.json: speedup over 3.12.0 at each of 317 commits, ending at 6.7x. Labeled steps, by theme: 6, 2, 2, 2. dump() twitter.json 1× - -2× - -4× - -8× - -16× + +2× + +4× + +8× + +16× 3.12.0 Sep 2026 Oct - -#5285: 3.3× - -#5285 -#5738: 3.8× - -#5738 -#5878: 4.5× - -#5878 -#5883: 6.8× - -#5883 + +#5285: 3.3× + + +6 +#5738: 3.8× + + +2 +#5878: 4.5× + + +2 +#5883: 6.8× + + +2 speedup over 3.12.0 (log scale), more is better diff --git a/docs/mkdocs/docs/images/perf_blog_timeline_from_cbor_twitter.svg b/docs/mkdocs/docs/images/perf_blog_timeline_from_cbor_twitter.svg index d3e09ce78..ee08d7ca5 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_from_cbor_twitter.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_from_cbor_twitter.svg @@ -1,32 +1,36 @@ from_cbor() twitter: speedup over 3.12.0 by commit -from_cbor() twitter: speedup over 3.12.0 at each of 317 commits, ending at 2.6x. Labeled steps: #5233, #5501, #5185, #5746. +from_cbor() twitter: speedup over 3.12.0 at each of 317 commits, ending at 2.6x. Labeled steps, by theme: 1, 4, U, U. from_cbor() twitter 1× - -2× - -4× + +2× + +4× 3.12.0 Sep 2026 Oct - -#5233: 1.47× - -#5233 -#5501: 2.2× - -#5501 -#5185: 1.76× - -#5185 -#5746: 2.3× - -#5746 + +#5233: 1.47× + + +1 +#5501: 2.2× + + +4 +#5185: 1.76× + + +U +#5746: 2.3× + + +U speedup over 3.12.0 (log scale), more is better diff --git a/docs/mkdocs/docs/images/perf_blog_timeline_parse_canada.svg b/docs/mkdocs/docs/images/perf_blog_timeline_parse_canada.svg index 4d9c79f3c..2402a0b50 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_parse_canada.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_parse_canada.svg @@ -1,38 +1,44 @@ parse() canada.json: speedup over 3.12.0 by commit -parse() canada.json: speedup over 3.12.0 at each of 317 commits, ending at 2.8x. Labeled steps: #5234, #5283, #5617, #5738, #5851, #5882. +parse() canada.json: speedup over 3.12.0 at each of 317 commits, ending at 2.8x. Labeled steps, by theme: 4, 1, 3, 3, 3, 4. parse() canada.json 1× - -2× - -4× + +2× + +4× 3.12.0 Sep 2026 Oct - -#5234: 1.11× - -#5234 -#5283: 1.47× - -#5283 -#5617: 1.48× - -#5617 -#5738: 1.95× - -#5738 -#5851: 2.2× - -#5851 -#5882: 2.8× - -#5882 + +#5234: 1.11× + + +4 +#5283: 1.47× + + +1 +#5617: 1.48× + + +3 +#5738: 1.95× + + +3 +#5851: 2.2× + + +3 +#5882: 2.8× + + +4 speedup over 3.12.0 (log scale), more is better diff --git a/docs/mkdocs/docs/images/perf_blog_timeline_parse_citm.svg b/docs/mkdocs/docs/images/perf_blog_timeline_parse_citm.svg index b8473fb09..f8d0d8a5c 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_parse_citm.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_parse_citm.svg @@ -1,38 +1,45 @@ parse() citm_catalog.json: speedup over 3.12.0 by commit -parse() citm_catalog.json: speedup over 3.12.0 at each of 317 commits, ending at 3.3x. Labeled steps: #5234, #5283, #5592, #5809, #5810, #5882. +parse() citm_catalog.json: speedup over 3.12.0 at each of 317 commits, ending at 3.3x. Labeled steps, by theme: 4, 1, 4, 4, 2, 4. parse() citm_catalog.json 1× - -2× - -4× - -8× + +2× + +4× + +8× 3.12.0 Sep 2026 Oct - -#5234: 1.55× - -#5234 -#5283: 1.95× - -#5283 -#5592: 2.2× - -#5592 -#5809: 2.4× -#5810: 2.8× - -#5809, #5810 -#5882: 3.3× - -#5882 + +#5234: 1.55× + + +4 +#5283: 1.95× + + +1 +#5592: 2.2× + + +4 +#5809: 2.4× +#5810: 2.8× + + +4 + +2 +#5882: 3.3× + + +4 speedup over 3.12.0 (log scale), more is better diff --git a/docs/mkdocs/docs/images/perf_blog_timeline_parse_twitter_ifstream.svg b/docs/mkdocs/docs/images/perf_blog_timeline_parse_twitter_ifstream.svg index fee96a029..512b30758 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_parse_twitter_ifstream.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_parse_twitter_ifstream.svg @@ -1,26 +1,28 @@ parse() twitter.json, std::ifstream: speedup over 3.12.0 by commit -parse() twitter.json, std::ifstream: speedup over 3.12.0 at each of 317 commits, ending at 2.2x. Labeled steps: #5828, #5884. +parse() twitter.json, std::ifstream: speedup over 3.12.0 at each of 317 commits, ending at 2.2x. Labeled steps, by theme: 1, 1. parse() twitter.json, std::ifstream 1× - -2× - -4× + +2× + +4× 3.12.0 Sep 2026 Oct - -#5828: 1.97× - -#5828 -#5884: 2.2× - -#5884 + +#5828: 1.97× + + +1 +#5884: 2.2× + + +1 speedup over 3.12.0 (log scale), more is better diff --git a/docs/mkdocs/docs/images/perf_blog_timeline_to_cbor_twitter.svg b/docs/mkdocs/docs/images/perf_blog_timeline_to_cbor_twitter.svg index 48dbdcac7..b402c9879 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_to_cbor_twitter.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_to_cbor_twitter.svg @@ -1,31 +1,34 @@ to_cbor() twitter: speedup over 3.12.0 by commit -to_cbor() twitter: speedup over 3.12.0 at each of 317 commits, ending at 5.0x. Labeled steps: #5328, #5824, #5885. +to_cbor() twitter: speedup over 3.12.0 at each of 317 commits, ending at 5.0x. Labeled steps, by theme: 4, 6, 6. to_cbor() twitter 1× - -2× - -4× - -8× + +2× + +4× + +8× 3.12.0 Sep 2026 Oct - -#5328: 2.2× - -#5328 -#5824: 3.5× - -#5824 -#5885: 5.1× - -#5885 + +#5328: 2.2× + + +4 +#5824: 3.5× + + +6 +#5885: 5.1× + + +6 speedup over 3.12.0 (log scale), more is better diff --git a/docs/mkdocs/docs/images/perf_blog_usecases_mac.svg b/docs/mkdocs/docs/images/perf_blog_usecases_mac.svg new file mode 100644 index 000000000..05bcf0353 --- /dev/null +++ b/docs/mkdocs/docs/images/perf_blog_usecases_mac.svg @@ -0,0 +1,359 @@ + +Use cases: time of each library relative to the fastest, Apple M1 Max +Table of relative times, libraries by use case. nlohmann/json json_document validate: 1.00; nlohmann/json json_document sum: 1.00; nlohmann/json json_document select: 1.00; nlohmann/json json_document edit: 1.00; nlohmann/json json_document minify: 1.00; nlohmann/json json_document write: 1.00; yyjson validate: 1.30; yyjson sum: 1.14; yyjson select: 1.29; yyjson edit: 1.48; yyjson minify: 1.24; yyjson write: 1.24; sonic-rs (Rust) validate: 1.79; sonic-rs (Rust) sum: 1.54; sonic-rs (Rust) select: 1.84; sonic-rs (Rust) edit: 2.09; sonic-rs (Rust) minify: 1.93; sonic-rs (Rust) write: 2.37; simdjson validate: 1.46; simdjson sum: 1.24; simdjson select: 1.48 (0.85 checking less, partial); simdjson edit: n/a; simdjson minify: 2.41 (0.19 checking less, partial); simdjson write: 4.02; simd-json (Rust) validate: 1.95; simd-json (Rust) sum: 1.65; simd-json (Rust) select: 2.35; simd-json (Rust) edit: 2.84; simd-json (Rust) minify: 3.39; simd-json (Rust) write: 3.13; sonic-cpp validate: no fully validating way (2.33 checking less, no U​TF-8); sonic-cpp sum: no fully validating way (1.85 checking less, no U​TF-8); sonic-cpp select: no fully validating way (2.30 checking less, no U​TF-8); sonic-cpp edit: no fully validating way (1.70 checking less, no U​TF-8); sonic-cpp minify: no fully validating way (2.02 checking less, no U​TF-8); sonic-cpp write: 1.59; Glaze validate: 1.88; Glaze sum: 5.58; Glaze select: 1.82 (0.83 checking less, partial); Glaze edit: 4.44; Glaze minify: 5.18 (1.04 checking less, partial); Glaze write: 2.21; Boost.J​SON validate: 2.87; Boost.J​SON sum: 2.00; Boost.J​SON select: 4.09; Boost.J​SON edit: 3.23; Boost.J​SON minify: 3.86; Boost.J​SON write: 3.68; serde_json (Rust) validate: 2.28 (2.06 checking less, no U​TF-8); serde_json (Rust) sum: 2.59; serde_json (Rust) select: 2.38 (2.24 checking less, no U​TF-8); serde_json (Rust) edit: 4.97; serde_json (Rust) minify: 5.80; serde_json (Rust) write: 2.95; nlohmann/json json validate: 2.65; nlohmann/json json sum: 1.96; nlohmann/json json select: 6.83; nlohmann/json json edit: 3.58; nlohmann/json json minify: 4.87; nlohmann/json json write: 2.05; RapidJSON validate: 6.21 (4.04 checking less, no U​TF-8); RapidJSON sum: 4.45 (3.02 checking less, no U​TF-8); RapidJSON select: 5.90 (3.85 checking less, no U​TF-8); RapidJSON edit: 4.85 (3.82 checking less, no U​TF-8); RapidJSON minify: 4.85 (4.54 checking less, no U​TF-8); RapidJSON write: 5.78. +validate +sum +select +edit +minify +write +nlohmann/json json_document + + +1.00 + + + +1.00 + + + +1.00 + + + +1.00 + + + +1.00 + + + +1.00 + +yyjson + + +1.30 + + + +1.14 + + + +1.29 + + + +1.48 + + + +1.24 + + + +1.24 + +sonic-rs (Rust) + + +1.79 + + + +1.54 + + + +1.84 + + + +2.09 + + + +1.93 + + + +2.37 + +simdjson + + +1.46 + + + +1.24 + + + +1.48 + + + +0.85 +P + + + +n/a + + + +2.41 + + + +0.19 +P + + + +4.02 + +simd-json (Rust) + + +1.95 + + + +1.65 + + + +2.35 + + + +2.84 + + + +3.39 + + + +3.13 + +sonic-cpp + + +2.33 +U + + + +1.85 +U + + + +2.30 +U + + + +1.70 +U + + + +2.02 +U + + + +1.59 + +Glaze + + +1.88 + + + +5.58 + + + +1.82 + + + +0.83 +P + + + +4.44 + + + +5.18 + + + +1.04 +P + + + +2.21 + +Boost.J​SON + + +2.87 + + + +2.00 + + + +4.09 + + + +3.23 + + + +3.86 + + + +3.68 + +serde_json (Rust) + + +2.28 + + + +2.06 +U + + + +2.59 + + + +2.38 + + + +2.24 +U + + + +4.97 + + + +5.80 + + + +2.95 + +nlohmann/json json + + +2.65 + + + +1.96 + + + +6.83 + + + +3.58 + + + +4.87 + + + +2.05 + +RapidJSON + + +6.21 + + + +4.04 +U + + + +4.45 + + + +3.02 +U + + + +5.90 + + + +3.85 +U + + + +4.85 + + + +3.82 +U + + + +4.85 + + + +4.54 +U + + + +5.78 + +time relative to the fastest fully validating library, less is better + +below 1.15 + +1.15 to 1.5 + +1.5 to 2.5 + +2.5 to 5 + +5 and more + +n/a +no A​PI for it + diff --git a/docs/mkdocs/docs/images/perf_blog_usecases_x86-clang.svg b/docs/mkdocs/docs/images/perf_blog_usecases_x86-clang.svg new file mode 100644 index 000000000..75ffa350d --- /dev/null +++ b/docs/mkdocs/docs/images/perf_blog_usecases_x86-clang.svg @@ -0,0 +1,359 @@ + +Use cases: time of each library relative to the fastest, x86-64 with Clang 23 +Table of relative times, libraries by use case. nlohmann/json json_document validate: 1.00; nlohmann/json json_document sum: 1.00; nlohmann/json json_document select: 1.00; nlohmann/json json_document edit: 1.00; nlohmann/json json_document minify: 1.00; nlohmann/json json_document write: 1.00; yyjson validate: 1.40; yyjson sum: 1.14; yyjson select: 1.38; yyjson edit: 1.50; yyjson minify: 1.28; yyjson write: 1.18; sonic-rs (Rust) validate: 1.15; sonic-rs (Rust) sum: 1.05; sonic-rs (Rust) select: 1.33; sonic-rs (Rust) edit: 1.90; sonic-rs (Rust) minify: 1.73; sonic-rs (Rust) write: 2.00; simdjson validate: 1.29; simdjson sum: 1.10; simdjson select: 1.29 (0.61 checking less, partial); simdjson edit: n/a; simdjson minify: 2.06 (0.19 checking less, partial); simdjson write: 3.18; sonic-cpp validate: no fully validating way (1.46 checking less, no U​TF-8); sonic-cpp sum: no fully validating way (1.18 checking less, no U​TF-8); sonic-cpp select: no fully validating way (1.43 checking less, no U​TF-8); sonic-cpp edit: no fully validating way (1.18 checking less, no U​TF-8); sonic-cpp minify: no fully validating way (1.37 checking less, no U​TF-8); sonic-cpp write: 1.37; Boost.J​SON validate: 1.58; Boost.J​SON sum: 1.10; Boost.J​SON select: 3.00; Boost.J​SON edit: 2.30; Boost.J​SON minify: 2.69; Boost.J​SON write: 2.36; simd-json (Rust) validate: 2.22; simd-json (Rust) sum: 1.83; simd-json (Rust) select: 2.54; simd-json (Rust) edit: 3.05; simd-json (Rust) minify: 3.42; simd-json (Rust) write: 2.24; serde_json (Rust) validate: 1.47 (1.31 checking less, no U​TF-8); serde_json (Rust) sum: 2.18; serde_json (Rust) select: 1.69; serde_json (Rust) edit: 5.01; serde_json (Rust) minify: 5.25; serde_json (Rust) write: 2.19; nlohmann/json json validate: 1.94; nlohmann/json json sum: 1.49; nlohmann/json json select: 7.92; nlohmann/json json edit: 4.24; nlohmann/json json minify: 5.30; nlohmann/json json write: 1.92; Glaze validate: 1.40; Glaze sum: 7.35 (5.04 checking less, partial); Glaze select: 1.35 (0.61 checking less, partial); Glaze edit: 6.32; Glaze minify: 6.39 (0.69 checking less, partial); Glaze write: 2.03; RapidJSON validate: 4.31 (3.29 checking less, no U​TF-8); RapidJSON sum: 3.16 (2.42 checking less, no U​TF-8); RapidJSON select: 4.32 (3.40 checking less, no U​TF-8); RapidJSON edit: 3.16 (2.69 checking less, no U​TF-8); RapidJSON minify: 3.48 (2.90 checking less, no U​TF-8); RapidJSON write: 2.93. +validate +sum +select +edit +minify +write +nlohmann/json json_document + + +1.00 + + + +1.00 + + + +1.00 + + + +1.00 + + + +1.00 + + + +1.00 + +yyjson + + +1.40 + + + +1.14 + + + +1.38 + + + +1.50 + + + +1.28 + + + +1.18 + +sonic-rs (Rust) + + +1.15 + + + +1.05 + + + +1.33 + + + +1.90 + + + +1.73 + + + +2.00 + +simdjson + + +1.29 + + + +1.10 + + + +1.29 + + + +0.61 +P + + + +n/a + + + +2.06 + + + +0.19 +P + + + +3.18 + +sonic-cpp + + +1.46 +U + + + +1.18 +U + + + +1.43 +U + + + +1.18 +U + + + +1.37 +U + + + +1.37 + +Boost.J​SON + + +1.58 + + + +1.10 + + + +3.00 + + + +2.30 + + + +2.69 + + + +2.36 + +simd-json (Rust) + + +2.22 + + + +1.83 + + + +2.54 + + + +3.05 + + + +3.42 + + + +2.24 + +serde_json (Rust) + + +1.47 + + + +1.31 +U + + + +2.18 + + + +1.69 + + + +5.01 + + + +5.25 + + + +2.19 + +nlohmann/json json + + +1.94 + + + +1.49 + + + +7.92 + + + +4.24 + + + +5.30 + + + +1.92 + +Glaze + + +1.40 + + + +7.35 + + + +5.04 +P + + + +1.35 + + + +0.61 +P + + + +6.32 + + + +6.39 + + + +0.69 +P + + + +2.03 + +RapidJSON + + +4.31 + + + +3.29 +U + + + +3.16 + + + +2.42 +U + + + +4.32 + + + +3.40 +U + + + +3.16 + + + +2.69 +U + + + +3.48 + + + +2.90 +U + + + +2.93 + +time relative to the fastest fully validating library, less is better + +below 1.15 + +1.15 to 1.5 + +1.5 to 2.5 + +2.5 to 5 + +5 and more + +n/a +no A​PI for it + diff --git a/docs/mkdocs/docs/images/perf_blog_usecases_x86-gcc.svg b/docs/mkdocs/docs/images/perf_blog_usecases_x86-gcc.svg new file mode 100644 index 000000000..98913e359 --- /dev/null +++ b/docs/mkdocs/docs/images/perf_blog_usecases_x86-gcc.svg @@ -0,0 +1,359 @@ + +Use cases: time of each library relative to the fastest, x86-64 with G​CC 16.2 +Table of relative times, libraries by use case. nlohmann/json json_document validate: 1.00; nlohmann/json json_document sum: 1.10; nlohmann/json json_document select: 1.00; nlohmann/json json_document edit: 1.00; nlohmann/json json_document minify: 1.00; nlohmann/json json_document write: 1.00; yyjson validate: 1.53; yyjson sum: 1.32; yyjson select: 1.47; yyjson edit: 1.45; yyjson minify: 1.28; yyjson write: 1.07; sonic-rs (Rust) validate: 1.17; sonic-rs (Rust) sum: 1.15; sonic-rs (Rust) select: 1.31; sonic-rs (Rust) edit: 1.92; sonic-rs (Rust) minify: 1.67; sonic-rs (Rust) write: 1.98; simdjson validate: 1.27; simdjson sum: 1.00; simdjson select: 1.26 (0.62 checking less, partial); simdjson edit: n/a; simdjson minify: 1.87 (0.18 checking less, partial); simdjson write: 2.84; sonic-cpp validate: no fully validating way (1.41 checking less, no U​TF-8); sonic-cpp sum: no fully validating way (1.25 checking less, no U​TF-8); sonic-cpp select: no fully validating way (1.36 checking less, no U​TF-8); sonic-cpp edit: no fully validating way (1.21 checking less, no U​TF-8); sonic-cpp minify: no fully validating way (1.34 checking less, no U​TF-8); sonic-cpp write: 1.50; Boost.J​SON validate: 1.67; Boost.J​SON sum: 1.26; Boost.J​SON select: 3.04; Boost.J​SON edit: 2.24; Boost.J​SON minify: 2.57; Boost.J​SON write: 2.25; simd-json (Rust) validate: 2.26; simd-json (Rust) sum: 1.99; simd-json (Rust) select: 2.52; simd-json (Rust) edit: 3.09; simd-json (Rust) minify: 3.31; simd-json (Rust) write: 2.22; serde_json (Rust) validate: 1.49 (1.33 checking less, no U​TF-8); serde_json (Rust) sum: 2.38; serde_json (Rust) select: 1.67; serde_json (Rust) edit: 5.07; serde_json (Rust) minify: 5.07; serde_json (Rust) write: 2.17; RapidJSON validate: 3.34 (3.06 checking less, no U​TF-8); RapidJSON sum: 2.70 (2.46 checking less, no U​TF-8); RapidJSON select: 3.27 (3.10 checking less, no U​TF-8); RapidJSON edit: 2.64 (2.54 checking less, no U​TF-8); RapidJSON minify: 3.37 (2.78 checking less, no U​TF-8); RapidJSON write: 2.95; Glaze validate: 1.76; Glaze sum: 5.98 (5.38 checking less, partial); Glaze select: 1.71 (0.59 checking less, partial); Glaze edit: 5.05; Glaze minify: 4.82 (0.75 checking less, partial); Glaze write: 1.90; nlohmann/json json validate: 2.06; nlohmann/json json sum: 1.67; nlohmann/json json select: 7.98; nlohmann/json json edit: 4.16; nlohmann/json json minify: 5.23; nlohmann/json json write: 1.87. +validate +sum +select +edit +minify +write +nlohmann/json json_document + + +1.00 + + + +1.10 + + + +1.00 + + + +1.00 + + + +1.00 + + + +1.00 + +yyjson + + +1.53 + + + +1.32 + + + +1.47 + + + +1.45 + + + +1.28 + + + +1.07 + +sonic-rs (Rust) + + +1.17 + + + +1.15 + + + +1.31 + + + +1.92 + + + +1.67 + + + +1.98 + +simdjson + + +1.27 + + + +1.00 + + + +1.26 + + + +0.62 +P + + + +n/a + + + +1.87 + + + +0.18 +P + + + +2.84 + +sonic-cpp + + +1.41 +U + + + +1.25 +U + + + +1.36 +U + + + +1.21 +U + + + +1.34 +U + + + +1.50 + +Boost.J​SON + + +1.67 + + + +1.26 + + + +3.04 + + + +2.24 + + + +2.57 + + + +2.25 + +simd-json (Rust) + + +2.26 + + + +1.99 + + + +2.52 + + + +3.09 + + + +3.31 + + + +2.22 + +serde_json (Rust) + + +1.49 + + + +1.33 +U + + + +2.38 + + + +1.67 + + + +5.07 + + + +5.07 + + + +2.17 + +RapidJSON + + +3.34 + + + +3.06 +U + + + +2.70 + + + +2.46 +U + + + +3.27 + + + +3.10 +U + + + +2.64 + + + +2.54 +U + + + +3.37 + + + +2.78 +U + + + +2.95 + +Glaze + + +1.76 + + + +5.98 + + + +5.38 +P + + + +1.71 + + + +0.59 +P + + + +5.05 + + + +4.82 + + + +0.75 +P + + + +1.90 + +nlohmann/json json + + +2.06 + + + +1.67 + + + +7.98 + + + +4.16 + + + +5.23 + + + +1.87 + +time relative to the fastest fully validating library, less is better + +below 1.15 + +1.15 to 1.5 + +1.5 to 2.5 + +2.5 to 5 + +5 and more + +n/a +no A​PI for it + diff --git a/docs/mkdocs/docs/images/perf_blog_usecases_x86-gcc13.svg b/docs/mkdocs/docs/images/perf_blog_usecases_x86-gcc13.svg new file mode 100644 index 000000000..53ad85187 --- /dev/null +++ b/docs/mkdocs/docs/images/perf_blog_usecases_x86-gcc13.svg @@ -0,0 +1,359 @@ + +Use cases: time of each library relative to the fastest, x86-64 with G​CC 13 +Table of relative times, libraries by use case. nlohmann/json json_document validate: 1.00; nlohmann/json json_document sum: 1.11; nlohmann/json json_document select: 1.00; nlohmann/json json_document edit: 1.00; nlohmann/json json_document minify: 1.00; nlohmann/json json_document write: 1.00; yyjson validate: 1.68; yyjson sum: 1.47; yyjson select: 1.63; yyjson edit: 1.56; yyjson minify: 1.35; yyjson write: 1.14; sonic-rs (Rust) validate: 1.12; sonic-rs (Rust) sum: 1.14; sonic-rs (Rust) select: 1.28; sonic-rs (Rust) edit: 1.88; sonic-rs (Rust) minify: 1.65; sonic-rs (Rust) write: 1.94; simdjson validate: 1.31; simdjson sum: 1.00; simdjson select: 1.30 (0.69 checking less, partial); simdjson edit: n/a; simdjson minify: 1.86 (0.21 checking less, partial); simdjson write: 2.86; sonic-cpp validate: no fully validating way (1.45 checking less, no U​TF-8); sonic-cpp sum: no fully validating way (1.32 checking less, no U​TF-8); sonic-cpp select: no fully validating way (1.42 checking less, no U​TF-8); sonic-cpp edit: no fully validating way (1.22 checking less, no U​TF-8); sonic-cpp minify: no fully validating way (1.36 checking less, no U​TF-8); sonic-cpp write: 1.50; Boost.J​SON validate: 1.62; Boost.J​SON sum: 1.32; Boost.J​SON select: 3.26; Boost.J​SON edit: 2.44; Boost.J​SON minify: 2.70; Boost.J​SON write: 2.39; simd-json (Rust) validate: 2.17; simd-json (Rust) sum: 1.98; simd-json (Rust) select: 2.44; simd-json (Rust) edit: 3.03; simd-json (Rust) minify: 3.27; simd-json (Rust) write: 2.17; serde_json (Rust) validate: 1.43 (1.28 checking less, no U​TF-8); serde_json (Rust) sum: 2.37; serde_json (Rust) select: 1.62; serde_json (Rust) edit: 4.96; serde_json (Rust) minify: 5.01; serde_json (Rust) write: 2.12; Glaze validate: 1.33; Glaze sum: 6.46 (5.20 checking less, partial); Glaze select: 1.35 (0.58 checking less, partial); Glaze edit: 5.23; Glaze minify: 5.12 (0.70 checking less, partial); Glaze write: 1.92; nlohmann/json json validate: 2.00; nlohmann/json json sum: 1.73; nlohmann/json json select: 7.68; nlohmann/json json edit: 4.27; nlohmann/json json minify: 5.15; nlohmann/json json write: 1.88; RapidJSON validate: 3.97 (3.13 checking less, no U​TF-8); RapidJSON sum: 3.21 (2.54 checking less, no U​TF-8); RapidJSON select: 3.98 (3.24 checking less, no U​TF-8); RapidJSON edit: 3.02 (2.63 checking less, no U​TF-8); RapidJSON minify: 3.65 (2.79 checking less, no U​TF-8); RapidJSON write: 3.05. +validate +sum +select +edit +minify +write +nlohmann/json json_document + + +1.00 + + + +1.11 + + + +1.00 + + + +1.00 + + + +1.00 + + + +1.00 + +yyjson + + +1.68 + + + +1.47 + + + +1.63 + + + +1.56 + + + +1.35 + + + +1.14 + +sonic-rs (Rust) + + +1.12 + + + +1.14 + + + +1.28 + + + +1.88 + + + +1.65 + + + +1.94 + +simdjson + + +1.31 + + + +1.00 + + + +1.30 + + + +0.69 +P + + + +n/a + + + +1.86 + + + +0.21 +P + + + +2.86 + +sonic-cpp + + +1.45 +U + + + +1.32 +U + + + +1.42 +U + + + +1.22 +U + + + +1.36 +U + + + +1.50 + +Boost.J​SON + + +1.62 + + + +1.32 + + + +3.26 + + + +2.44 + + + +2.70 + + + +2.39 + +simd-json (Rust) + + +2.17 + + + +1.98 + + + +2.44 + + + +3.03 + + + +3.27 + + + +2.17 + +serde_json (Rust) + + +1.43 + + + +1.28 +U + + + +2.37 + + + +1.62 + + + +4.96 + + + +5.01 + + + +2.12 + +Glaze + + +1.33 + + + +6.46 + + + +5.20 +P + + + +1.35 + + + +0.58 +P + + + +5.23 + + + +5.12 + + + +0.70 +P + + + +1.92 + +nlohmann/json json + + +2.00 + + + +1.73 + + + +7.68 + + + +4.27 + + + +5.15 + + + +1.88 + +RapidJSON + + +3.97 + + + +3.13 +U + + + +3.21 + + + +2.54 +U + + + +3.98 + + + +3.24 +U + + + +3.02 + + + +2.63 +U + + + +3.65 + + + +2.79 +U + + + +3.05 + +time relative to the fastest fully validating library, less is better + +below 1.15 + +1.15 to 1.5 + +1.5 to 2.5 + +2.5 to 5 + +5 and more + +n/a +no A​PI for it + diff --git a/docs/mkdocs/docs/js/fig-charts.js b/docs/mkdocs/docs/js/fig-charts.js index 310987811..5c88da66f 100644 --- a/docs/mkdocs/docs/js/fig-charts.js +++ b/docs/mkdocs/docs/js/fig-charts.js @@ -104,3 +104,72 @@ init(); } })(); + +/* figures: the tooltips of the heatmaps in home/blog/how_3_13_0_got_faster.md (perf_blog_usecases_*.svg). Each + cell is a focusable : its lines (the first one the heading) are shown on hover, keyboard focus or tap. + Without JS, the figure's and the tables in the appendix carry the same numbers. */ +(function () { + "use strict"; + + var tip = null; + var current = null; + + function show(cell) { + if (!tip) { + tip = document.createElement("div"); + tip.className = "nj-heat-tip"; + tip.setAttribute("role", "tooltip"); + tip.hidden = true; + document.body.appendChild(tip); + } + if (current) current.classList.remove("nj-heat-on"); + current = cell; + cell.classList.add("nj-heat-on"); + var lines = (cell.getAttribute("data-tip") || "").split("\n"); + tip.textContent = ""; + lines.forEach(function (line, i) { + var el = document.createElement(i === 0 ? "strong" : "div"); + el.textContent = line; + tip.appendChild(el); + }); + tip.hidden = false; + var r = cell.getBoundingClientRect(); + var w = tip.offsetWidth, h = tip.offsetHeight; + var x = Math.min(Math.max(8, r.left + r.width / 2 - w / 2), document.documentElement.clientWidth - w - 8); + var y = r.bottom + 8 + h > window.innerHeight ? r.top - h - 8 : r.bottom + 8; + tip.style.left = (x + window.scrollX) + "px"; + tip.style.top = (y + window.scrollY) + "px"; + } + + function hide() { + if (current) current.classList.remove("nj-heat-on"); + current = null; + if (tip) tip.hidden = true; + } + + function init() { + hide(); + Array.prototype.forEach.call(document.querySelectorAll("svg.nj-charts--heat .nj-heat-cell"), function (cell) { + if (cell.dataset.njHeatReady) return; + cell.dataset.njHeatReady = "1"; + cell.addEventListener("mouseenter", function () { show(cell); }); + cell.addEventListener("mouseleave", hide); + cell.addEventListener("focus", function () { show(cell); }); + cell.addEventListener("blur", hide); + // a tap also focuses the cell; a tap elsewhere or Escape hides the tooltip + cell.addEventListener("click", function (ev) { ev.stopPropagation(); show(cell); }); + }); + } + + document.addEventListener("click", hide); + document.addEventListener("keydown", function (ev) { if (ev.key === "Escape") hide(); }); + window.addEventListener("scroll", hide, { passive: true }); + + if (typeof document$ !== "undefined" && document$ && typeof document$.subscribe === "function") { + document$.subscribe(init); + } else if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init); + } else { + init(); + } +})(); diff --git a/docs/mkdocs/includes/glossary.md b/docs/mkdocs/includes/glossary.md index b84567b14..352c1dcf7 100644 --- a/docs/mkdocs/includes/glossary.md +++ b/docs/mkdocs/includes/glossary.md @@ -8,6 +8,7 @@ *[BDFL]: Benevolent Dictator for Life *[BJData]: Binary JData *[BON8]: Binary Object Notation 8 +*[BSL]: Boost Software License *[BSON]: Binary JSON *[CBOR]: Concise Binary Object Representation *[CC0]: Creative Commons Zero @@ -16,6 +17,7 @@ *[CUDA]: Compute Unified Device Architecture *[CVE]: Common Vulnerabilities and Exposures *[DOM]: Document Object Model +*[EDG]: Edison Design Group, maker of a C++ compiler front end *[EOF]: End of File *[FAQ]: Frequently Asked Questions *[GCC]: GNU Compiler Collection @@ -31,9 +33,11 @@ *[JSONC]: JSON with Comments *[JWCC]: JSON With Commas and Comments *[LLDB]: LLVM Debugger +*[LTO]: Link-Time Optimization *[LTS]: Long-Term Support *[MinGW]: Minimalist GNU for Windows *[MIT]: Massachusetts Institute of Technology +*[MPL]: Mozilla Public License *[MsgPack]: MessagePack *[MSVC]: Microsoft Visual C++ *[NaN]: Not a Number @@ -42,6 +46,7 @@ *[NEON]: Arm SIMD instruction set extension *[NUL]: Null character (U+0000, byte value 0) *[ODR]: One Definition Rule +*[PCH]: Precompiled Header *[REUSE]: Software licensing specification by the Free Software Foundation Europe *[RFC]: Request for Comments *[RTTI]: Runtime Type Information @@ -60,3 +65,4 @@ *[UDLs]: User-defined literals *[URL]: Uniform Resource Locator *[UTF]: Unicode Transformation Format +*[XOR]: Exclusive or diff --git a/docs/mkdocs/scripts/figures/data/perf_suite.csv b/docs/mkdocs/scripts/figures/data/perf_suite.csv new file mode 100644 index 000000000..1f2a17b83 --- /dev/null +++ b/docs/mkdocs/scripts/figures/data/perf_suite.csv @@ -0,0 +1,183 @@ +benchmark,unit,3.12.0,3.13.0,speedup +FromBinaryBuffer/bson / twitter,ns,3.07203e+06,998445,3.077 +ParseStringOrdered/jeopardy,ns,3.56038e+08,1.10829e+08,3.213 +JsonPointerToString/twitter,ns,2.16889e+06,793513,2.733 +BinaryToCbor/8192,ns,511.25,238.725,2.142 +FromMsgpack/unsigned_ints,ns,5.51164e+07,2.72444e+07,2.023 +JsonPointerAt/twitter,ns,780306,585055,1.334 +CopyOnly/twitter,ns,393964,399209,0.987 +FlattenOrdered/citm_catalog,ns,2.52682e+08,1.37388e+06,183.919 +FromBinaryFile/ubjson / canada,ns,1.34e+07,6.20075e+06,2.161 +FromBinaryShape/containers / bjdata,ns,1.41456e+07,7.04794e+06,2.007 +ParseIndented/jeopardy / 4,ns,3.33616e+08,1.31177e+08,2.543 +FromMsgpack/signed_ints,ns,6.19882e+07,3.19294e+07,1.941 +FromBinaryShape/containers / bson,ns,1.69936e+07,9.81169e+06,1.732 +BinaryToCbor/128,ns,247.24,110.472,2.238 +FromBinaryBuffer/cbor / jeopardy,ns,3.52319e+08,1.15873e+08,3.041 +ParseFile/jeopardy,ns,3.26899e+08,1.57231e+08,2.079 +FromMsgpack/jeopardy,ns,1.11847e+09,1.81305e+08,6.169 +FromBinaryFile/cbor / twitter,ns,9.70523e+06,1.5381e+06,6.310 +ToCbor/floats,ns,8.8461e+06,1.88426e+06,4.695 +ParseFile/small_signed_ints,ns,6.30771e+07,3.13826e+07,2.010 +FromBinaryBuffer/msgpack / twitter,ns,3.01937e+06,937570,3.220 +BinaryToCbor/16384,ns,947.242,408.275,2.320 +FromBinaryFile/bson / twitter,ns,9.98109e+06,1.78121e+06,5.604 +ParseString/twitter,ns,3.15572e+06,1.04655e+06,3.015 +Unflatten/twitter,ns,4.47709e+06,2.11403e+06,2.118 +BinaryToCbor/8,ns,242.891,46.6253,5.209 +BinaryToCbor/16,ns,238.431,46.5179,5.126 +Dump/small_signed_ints / 4,ns,2.49933e+07,8.62966e+06,2.896 +ParseString/jeopardy,ns,3.04927e+08,1.29515e+08,2.354 +Dump/signed_ints / 4,ns,3.18294e+07,1.68297e+07,1.891 +Flatten/twitter,ns,3.4886e+06,2.00532e+06,1.740 +FromBinaryBuffer/cbor / twitter,ns,3.00428e+06,964870,3.114 +Dump/jeopardy / 4,ns,2.19025e+08,3.43818e+07,6.370 +SaxParse/citm_catalog,ns,6.33865e+06,969665,6.537 +JsonPointerAt/citm_catalog,ns,1.80656e+06,1.10975e+06,1.628 +DestroyOnly/citm_catalog,ns,874073,663615,1.317 +FromBinaryShape/scalars / ubjson,ns,2.46643e+07,1.13906e+07,2.165 +Unflatten/canada,ns,4.04569e+07,1.07458e+07,3.765 +ParseString/floats,ns,1.18934e+08,3.02332e+07,3.934 +ParseIndented/canada / 4,ns,3.38495e+07,5.02409e+06,6.737 +ParseString/signed_ints,ns,1.19593e+08,3.14351e+07,3.804 +ParseFile/signed_ints,ns,1.24813e+08,4.61765e+07,2.703 +JsonPointerContains/twitter,ns,1.27938e+06,606069,2.111 +Dump/floats / 4,ns,7.10935e+07,2.41369e+07,2.945 +Dump/floats / -,ns,6.27641e+07,2.33213e+07,2.691 +ToCbor/canada,ns,1.36795e+06,546001,2.505 +FromBinaryBuffer/bson / canada,ns,9.21307e+06,5.51059e+06,1.672 +ToCbor/twitter,ns,638321,141975,4.496 +ParseIndented/twitter / 4,ns,3.58298e+06,1.10646e+06,3.238 +Iterate/citm_catalog,ns,297646,167302,1.779 +FromBinaryBuffer/bjdata / canada,ns,8.08015e+06,4.17334e+06,1.936 +ParseStreamValues/ndjson,ns,6.96248e+06,3.7254e+06,1.869 +Diff/twitter,ns,4.79296e+06,635531,7.542 +Dump/citm_catalog / -,ns,1.37753e+06,290658,4.739 +FromBinaryShape/nested / bjdata,ns,96017.5,37882.1,2.535 +ToJsonStrings/copy,ns,5.83243e+06,5.54046e+06,1.053 +Dump/canada / 4,ns,8.9039e+06,2.9943e+06,2.974 +CopyRing/twitter,ns,855374,766521,1.116 +FromBinaryBuffer/cbor / citm_catalog,ns,3.70397e+06,1.46121e+06,2.535 +FromBinaryFile/bjdata / twitter,ns,1.02688e+07,1.90492e+06,5.391 +FromBinaryShape/containers / ubjson_optimized,ns,1.4727e+07,4.80309e+06,3.066 +FromMsgpack/citm_catalog,ns,8.85701e+06,2.2473e+06,3.941 +CopyOnly/canada,ns,1.53425e+06,1.49609e+06,1.026 +Equal/canada,ns,453965,332795,1.364 +Diff/citm_catalog,ns,6.74369e+06,1.07135e+06,6.295 +ParseStringOrdered/canada,ns,1.49834e+07,4.29102e+06,3.492 +Flatten/canada,ns,2.82148e+07,1.11369e+07,2.533 +Accept/canada,ns,1.26836e+07,2.25933e+06,5.614 +CopyAssign/twitter,ns,804857,735341,1.095 +BinaryToCbor/4096,ns,402.442,159.22,2.528 +ParseFILE/citm_catalog,ns,3.45528e+07,7.26455e+06,4.756 +ToCbor/signed_ints,ns,1.13256e+07,2.76748e+06,4.092 +Patch/canada,ns,9.80719e+06,3.36006e+06,2.919 +GetArray>,ns,6589.63,655.021,10.060 +Dump/canada / -,ns,6.62927e+06,2.24661e+06,2.951 +GetVectorDouble/floats,ns,6.62214e+06,641259,10.327 +Accept/citm_catalog,ns,6.3596e+06,909397,6.993 +ParseFILE/twitter,ns,1.35627e+07,3.27982e+06,4.135 +FromBinaryBuffer/msgpack / jeopardy,ns,3.54302e+08,1.10166e+08,3.216 +ParseFile/floats,ns,1.3128e+08,4.88806e+07,2.686 +Accept/small_signed_ints,ns,5.5849e+07,1.88756e+07,2.959 +Accept/jeopardy,ns,2.2049e+08,6.3504e+07,3.472 +Accept/signed_ints,ns,1.15055e+08,2.84818e+07,4.040 +CopyRing/canada,ns,3.68758e+06,2.88527e+06,1.278 +Patch/twitter,ns,1.44963e+06,848729,1.708 +Iterate/twitter,ns,87147.2,61831.9,1.409 +ParseFile/twitter,ns,3.33795e+06,1.3545e+06,2.464 +GetArray>,ns,8110.78,1156.06,7.016 +FromBinaryBuffer/cbor / canada,ns,8.20468e+06,2.31071e+06,3.551 +Equal/twitter,ns,141057,125995,1.120 +ParseStreamValues/numbers,ns,1.87073e+06,370959,5.043 +Dump/small_signed_ints / -,ns,1.78162e+07,7.86562e+06,2.265 +JsonPointerToString/citm_catalog,ns,6.63798e+06,1.869e+06,3.552 +Copy/twitter,ns,797034,721889,1.104 +Diff/canada,ns,3.83337e+07,3.67301e+06,10.437 +FromBinaryBuffer/ubjson_optimized / twitter,ns,3.1281e+06,959992,3.258 +BinaryToCbor/32,ns,251.857,47.32,5.322 +GetArray>,ns,58113.1,40911.2,1.420 +CopyAssign/citm_catalog,ns,1.66804e+06,1.48043e+06,1.127 +ToCbor/jeopardy,ns,7.16464e+07,2.11077e+07,3.394 +CopyRing/citm_catalog,ns,1.70236e+06,1.50767e+06,1.129 +FromBinaryBuffer/ubjson / canada,ns,8.14082e+06,4.15725e+06,1.958 +ToCbor/small_signed_ints,ns,1.02087e+07,2.3872e+06,4.276 +DestroyOnly/canada,ns,2.13545e+06,1.37061e+06,1.558 +FromBinaryBuffer/ubjson / citm_catalog,ns,3.81161e+06,1.73601e+06,2.196 +Dump/jeopardy / -,ns,2.01242e+08,3.04052e+07,6.619 +FromBinaryBuffer/msgpack / citm_catalog,ns,3.70428e+06,1.42385e+06,2.602 +ParseStringOrdered/citm_catalog,ns,1.07899e+07,1.63999e+06,6.579 +ParseString/unsigned_ints,ns,1.17897e+08,3.02538e+07,3.897 +Patch/citm_catalog,ns,2.48869e+06,1.60776e+06,1.548 +SaxParse/canada,ns,1.28389e+07,3.21707e+06,3.991 +ParseString/citm_catalog,ns,7.20303e+06,1.7454e+06,4.127 +FromBinaryFile/cbor / canada,ns,1.42056e+07,4.37844e+06,3.244 +BinaryToCbor/256,ns,269.641,86.3027,3.124 +ParseFILE/canada,ns,5.22098e+07,1.38907e+07,3.759 +BinaryToCbor/32768,ns,1538.42,806.578,1.907 +Accept/floats,ns,1.13316e+08,2.40029e+07,4.721 +FromMsgpack/floats,ns,5.92985e+07,2.71551e+07,2.184 +ParseString/small_signed_ints,ns,6.05098e+07,2.18687e+07,2.767 +JsonPointerParse/citm_catalog,ns,5.64871e+06,2.16902e+06,2.604 +Copy/canada,ns,3.64004e+06,2.8296e+06,1.286 +Dump/twitter / 4,ns,1.56293e+06,247785,6.308 +FromBinaryShape/nested / msgpack,ns,90351.2,34224,2.640 +FromBinaryBuffer/ubjson_optimized / canada,ns,8.36221e+06,2.82594e+06,2.959 +JsonPointerContains/citm_catalog,ns,2.71985e+06,1.23844e+06,2.196 +FromMsgpack/small_signed_ints,ns,6.27969e+07,3.33815e+07,1.881 +DestroyOnly/twitter,ns,401772,322543,1.246 +FromBinaryShape/containers / msgpack,ns,1.37471e+07,3.71417e+06,3.701 +FromBinaryShape/scalars / msgpack,ns,2.40944e+07,9.77821e+06,2.464 +ToCbor/citm_catalog,ns,1.02089e+06,257529,3.964 +GetVectorInt/signed_ints,ns,8.04308e+06,3.35704e+06,2.396 +Accept/twitter,ns,2.45943e+06,458446,5.365 +Iterate/canada,ns,861455,320474,2.688 +ToCbor/unsigned_ints,ns,7.98977e+06,2.75684e+06,2.898 +FromBinaryShape/scalars / bjdata,ns,2.43317e+07,1.12007e+07,2.172 +BinaryToCbor/2048,ns,332.826,114.084,2.917 +BinaryToCbor/512,ns,291.316,92.8039,3.139 +FlattenOrdered/twitter,ns,4.92534e+07,851500,57.843 +Copy/citm_catalog,ns,1.61348e+06,1.44942e+06,1.113 +FromBinaryShape/containers / ubjson,ns,1.40981e+07,6.87399e+06,2.051 +BinaryToCbor/1024,ns,304.119,95.8643,3.172 +FromBinaryBuffer/ubjson / twitter,ns,3.12147e+06,962822,3.242 +Dump/signed_ints / -,ns,2.34455e+07,1.61521e+07,1.452 +FromBinaryShape/scalars / cbor,ns,2.54779e+07,9.63099e+06,2.645 +FromBinaryBuffer/cbor / signed_ints,ns,3.57449e+07,1.2803e+07,2.792 +CopyOnly/citm_catalog,ns,734852,783826,0.938 +Dump/unsigned_ints / -,ns,2.3437e+07,1.6565e+07,1.415 +Accept/unsigned_ints,ns,1.14173e+08,2.74092e+07,4.165 +FromMsgpack/canada,ns,1.42472e+07,4.37022e+06,3.260 +ParseStringOrdered/twitter,ns,4.32143e+06,910717,4.745 +Dump/twitter / -,ns,1.38581e+06,207620,6.675 +BinaryToCbor/64,ns,250.506,81.5793,3.071 +JsonPointerParse/twitter,ns,2.40825e+06,979256,2.459 +GetMap/citm_catalog,ns,3.41415e+06,2.37109e+06,1.440 +ToJsonStrings/move,ns,5.83899e+06,3.02241e+06,1.932 +FromBinaryBuffer/ubjson / jeopardy,ns,3.67059e+08,1.15063e+08,3.190 +FromBinaryShape/nested / ubjson,ns,96068.6,37753.5,2.545 +FromBinaryBuffer/bjdata / twitter,ns,3.11851e+06,963022,3.238 +FromBinaryShape/nested / cbor,ns,93124.8,34434.7,2.704 +ParseFile/citm_catalog,ns,7.62707e+06,2.39694e+06,3.182 +FromBinaryFile/ubjson / twitter,ns,1.04355e+07,1.90842e+06,5.468 +Dump/citm_catalog / 4,ns,1.92608e+06,416105,4.629 +CopyAssign/canada,ns,3.68545e+06,2.87633e+06,1.281 +Unflatten/citm_catalog,ns,9.65545e+06,3.47021e+06,2.782 +FromBinaryBuffer/bjdata_optimized / twitter,ns,3.14359e+06,967149,3.250 +FromBinaryBuffer/cbor / floats,ns,2.88404e+07,8.22731e+06,3.505 +Equal/citm_catalog,ns,264018,254367,1.038 +FromBinaryShape/containers / cbor,ns,1.38356e+07,3.8445e+06,3.599 +Flatten/citm_catalog,ns,6.43708e+06,2.96328e+06,2.172 +FromMsgpack/twitter,ns,9.69832e+06,1.46011e+06,6.642 +FromBinaryBuffer/bson / citm_catalog,ns,3.86353e+06,1.73584e+06,2.226 +FromBinaryBuffer/msgpack / canada,ns,8.21458e+06,2.2769e+06,3.608 +"GetArray>",ns,2228.17,630.225,3.536 +SaxParse/twitter,ns,2.4729e+06,472447,5.234 +ParseString/canada,ns,1.50552e+07,4.35028e+06,3.461 +ParseFile/canada,ns,1.79247e+07,6.11532e+06,2.931 +ParseFile/unsigned_ints,ns,1.22099e+08,4.40082e+07,2.774 +FromCborChunkedString/10000 chunks,ns,89638.1,81306.2,1.102 +FromBinaryShape/nested / bson,ns,102178,46148.5,2.214 +ParseIndented/citm_catalog / 4,ns,7.27956e+06,1.75204e+06,4.155 +Dump/unsigned_ints / 4,ns,3.15101e+07,1.7373e+07,1.814 +FromBinaryBuffer/bjdata_optimized / canada,ns,8.52567e+06,2.93164e+06,2.908 diff --git a/docs/mkdocs/scripts/figures/data/perf_usecases_mac.json b/docs/mkdocs/scripts/figures/data/perf_usecases_mac.json new file mode 100644 index 000000000..3aa074030 --- /dev/null +++ b/docs/mkdocs/scripts/figures/data/perf_usecases_mac.json @@ -0,0 +1,7224 @@ +{ + "validate": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 175.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 175.8, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 172.8, + "level": "full" + }, + "parse": { + "us": 175.8, + "level": "full" + }, + "accept": { + "us": 181.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 481.0, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 481.0, + "level": "full" + }, + "variants": { + "accept": { + "us": 481.0, + "level": "full" + }, + "parse": { + "us": 1343.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 180.5, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 180.5, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 180.5, + "level": "full" + }, + "read": { + "us": 189.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 221.0, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 221.0, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 203.8, + "level": "full" + }, + "DOM": { + "us": 221.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 379.5, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 379.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 328.6, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 328.6, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 328.6, + "level": "full" + }, + "generic": { + "us": 1256.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 536.2, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 536.2, + "level": "full" + }, + "variants": { + "SAX": { + "us": 536.2, + "level": "full" + }, + "parse": { + "us": 881.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1313.9, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 704.0, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 704.0, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 1161.5, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1191.1, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1313.9, + "level": "full" + }, + "SAX": { + "us": 1325.5, + "level": "full" + }, + "Document": { + "us": 1354.5, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 457.3, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 353.8, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 353.8, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 457.3, + "level": "full" + }, + "Value": { + "us": 1679.0, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 329.0, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 329.0, + "level": "full" + }, + "variants": { + "Value": { + "us": 329.0, + "level": "full" + }, + "IgnoredAny": { + "us": 431.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 304.1, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 304.1, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 296.0, + "level": "full" + }, + "tape (copy)": { + "us": 304.1, + "level": "full" + }, + "borrowed (copy)": { + "us": 574.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 358.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 358.9, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 358.0, + "level": "full" + }, + "parse": { + "us": 358.9, + "level": "full" + }, + "accept": { + "us": 359.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 897.2, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 897.2, + "level": "full" + }, + "variants": { + "accept": { + "us": 897.2, + "level": "full" + }, + "parse": { + "us": 2402.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 472.8, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 472.8, + "level": "full" + }, + "variants": { + "read": { + "us": 472.8, + "level": "full" + }, + "insitu (copy)": { + "us": 475.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 492.7, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 492.7, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 487.2, + "level": "full" + }, + "DOM": { + "us": 492.7, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 982.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 982.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 853.4, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 853.4, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 853.4, + "level": "full" + }, + "generic": { + "us": 2724.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 1017.2, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 1017.2, + "level": "full" + }, + "variants": { + "SAX": { + "us": 1017.2, + "level": "full" + }, + "parse": { + "us": 1485.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1568.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1149.5, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1149.5, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 1548.0, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1568.2, + "level": "full" + }, + "Document (no encoding check)": { + "us": 1613.3, + "level": "no UTF-8" + }, + "SAX": { + "us": 1633.8, + "level": "full" + }, + "Document": { + "us": 1691.6, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 1104.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1052.5, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 1052.5, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 1104.6, + "level": "full" + }, + "Value": { + "us": 2762.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 684.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 684.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 684.5, + "level": "full" + }, + "IgnoredAny": { + "us": 800.2, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 709.2, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 709.2, + "level": "full" + }, + "variants": { + "tape (copy)": { + "us": 709.2, + "level": "full" + }, + "tape (reused)": { + "us": 717.2, + "level": "full" + }, + "borrowed (copy)": { + "us": 1619.1, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 943.2, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 943.2, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 942.6, + "level": "full" + }, + "parse": { + "us": 943.2, + "level": "full" + }, + "accept": { + "us": 943.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 2462.9, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 2462.9, + "level": "full" + }, + "variants": { + "accept": { + "us": 2462.9, + "level": "full" + }, + "parse": { + "us": 5933.9, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1492.7, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1492.7, + "level": "full" + }, + "variants": { + "read": { + "us": 1492.7, + "level": "full" + }, + "insitu (copy)": { + "us": 1493.2, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 2103.5, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 2103.5, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 2099.0, + "level": "full" + }, + "DOM": { + "us": 2103.5, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 2577.2, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 2577.2, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 1301.7, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 1301.7, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 1301.7, + "level": "full" + }, + "generic": { + "us": 9338.5, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 3064.7, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 3064.7, + "level": "full" + }, + "variants": { + "SAX": { + "us": 3064.7, + "level": "full" + }, + "parse": { + "us": 3639.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 6870.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 6850.9, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 6850.9, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 6870.7, + "level": "full" + }, + "SAX": { + "us": 6973.5, + "level": "full" + }, + "SAX (no encoding check)": { + "us": 7014.5, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 7363.0, + "level": "no UTF-8" + }, + "Document": { + "us": 7363.7, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 1531.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1459.4, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 1459.4, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 1531.6, + "level": "full" + }, + "Value": { + "us": 7364.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 1929.8, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 1929.8, + "level": "full" + }, + "variants": { + "Value": { + "us": 1929.8, + "level": "full" + }, + "IgnoredAny": { + "us": 2101.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 2286.3, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 2286.3, + "level": "full" + }, + "variants": { + "tape (copy)": { + "us": 2286.3, + "level": "full" + }, + "tape (reused)": { + "us": 2286.9, + "level": "full" + }, + "borrowed (copy)": { + "us": 5042.7, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 22861.7, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 22861.7, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 22432.7, + "level": "full" + }, + "parse": { + "us": 22861.7, + "level": "full" + }, + "accept": { + "us": 22905.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 63383.2, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 63383.2, + "level": "full" + }, + "variants": { + "accept": { + "us": 63383.2, + "level": "full" + }, + "parse": { + "us": 168548.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 30541.9, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 30541.9, + "level": "full" + }, + "variants": { + "read": { + "us": 30541.9, + "level": "full" + }, + "insitu (copy)": { + "us": 30802.0, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 27311.2, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 27311.2, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 27216.0, + "level": "full" + }, + "DOM": { + "us": 27311.2, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 41571.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 41571.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 46471.0, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 46471.0, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 46471.0, + "level": "full" + }, + "generic": { + "us": 138804.5, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 55101.7, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 55101.7, + "level": "full" + }, + "variants": { + "SAX": { + "us": 55101.7, + "level": "full" + }, + "parse": { + "us": 91723.6, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 142654.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 65583.7, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 65583.7, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 136132.7, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 142654.0, + "level": "full" + }, + "Document (no encoding check)": { + "us": 145067.4, + "level": "no UTF-8" + }, + "SAX": { + "us": 153768.0, + "level": "full" + }, + "Document": { + "us": 159581.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 47547.4, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 44881.2, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 44881.2, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 47547.4, + "level": "full" + }, + "Value": { + "us": 184053.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 32168.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 32168.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 32168.6, + "level": "full" + }, + "IgnoredAny": { + "us": 49018.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 39592.1, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 39592.1, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 39367.1, + "level": "full" + }, + "tape (copy)": { + "us": 39592.1, + "level": "full" + }, + "borrowed (copy)": { + "us": 61088.8, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "accept", + "us": 1.0, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 1.0, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 0.9, + "level": "full" + }, + "accept": { + "us": 1.0, + "level": "full" + }, + "parse": { + "us": 1.0, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 2.4, + "level": "full" + }, + "variants": { + "accept": { + "us": 2.4, + "level": "full" + }, + "parse": { + "us": 7.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 0.9, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 0.9, + "level": "full" + }, + "variants": { + "read": { + "us": 0.9, + "level": "full" + }, + "insitu (copy)": { + "us": 0.9, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 1.1, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 1.1, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 0.9, + "level": "full" + }, + "DOM": { + "us": 1.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 1.4, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 1.4, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 1.4, + "level": "full" + }, + "generic": { + "us": 6.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 2.3, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 2.3, + "level": "full" + }, + "variants": { + "SAX": { + "us": 2.3, + "level": "full" + }, + "parse": { + "us": 3.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 6.1, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 2.6, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 2.6, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 5.2, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 5.9, + "level": "no UTF-8" + }, + "SAX": { + "us": 6.1, + "level": "full" + }, + "insitu (copy)": { + "us": 6.4, + "level": "full" + }, + "Document": { + "us": 6.7, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1.7, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 1.7, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 2.0, + "level": "full" + }, + "Value": { + "us": 7.4, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 1.4, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 1.4, + "level": "full" + }, + "variants": { + "Value": { + "us": 1.4, + "level": "full" + }, + "IgnoredAny": { + "us": 1.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 1.7, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 1.7, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 1.4, + "level": "full" + }, + "tape (copy)": { + "us": 1.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 3.1, + "level": "full" + } + } + } + } + }, + "sum": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 226.5, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 226.5, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 218.0, + "level": "full" + }, + "parse": { + "us": 226.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 461.0, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 461.0, + "level": "full" + }, + "variants": { + "sax": { + "us": 461.0, + "level": "full" + }, + "parse": { + "us": 1408.0, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 229.1, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 229.1, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 229.1, + "level": "full" + }, + "read": { + "us": 239.5, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 256.4, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 256.4, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 250.0, + "level": "full" + }, + "On-Demand (reused)": { + "us": 251.4, + "level": "full" + }, + "On-Demand": { + "us": 256.4, + "level": "full" + }, + "DOM": { + "us": 266.6, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 427.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 427.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 1322.6, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 1322.6, + "level": "full" + }, + "variants": { + "generic": { + "us": 1322.6, + "level": "full" + }, + "lazy_json": { + "us": 1968.7, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 537.2, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 537.2, + "level": "full" + }, + "variants": { + "SAX": { + "us": 537.2, + "level": "full" + }, + "parse": { + "us": 921.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 1331.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 754.6, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 754.6, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 1165.8, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1238.4, + "level": "no UTF-8" + }, + "SAX": { + "us": 1331.0, + "level": "full" + }, + "insitu (copy)": { + "us": 1360.8, + "level": "full" + }, + "Document": { + "us": 1404.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 664.8, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 664.8, + "level": "full" + }, + "variants": { + "visitor": { + "us": 664.8, + "level": "full" + }, + "Value": { + "us": 1693.8, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 372.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 372.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 372.2, + "level": "full" + }, + "Value": { + "us": 473.2, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 372.5, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 372.5, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 372.5, + "level": "full" + }, + "borrowed (reused)": { + "us": 659.5, + "level": "full" + }, + "borrowed (copy)": { + "us": 662.0, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 480.4, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 480.4, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 478.5, + "level": "full" + }, + "parse": { + "us": 480.4, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 928.0, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 928.0, + "level": "full" + }, + "variants": { + "sax": { + "us": 928.0, + "level": "full" + }, + "parse": { + "us": 2539.5, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 572.6, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 572.6, + "level": "full" + }, + "variants": { + "read": { + "us": 572.6, + "level": "full" + }, + "insitu (copy)": { + "us": 575.5, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 607.5, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 607.5, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 607.1, + "level": "full" + }, + "On-Demand": { + "us": 607.5, + "level": "full" + }, + "On-Demand (reused)": { + "us": 612.7, + "level": "full" + }, + "DOM": { + "us": 615.5, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1090.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1090.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 2845.3, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 2845.3, + "level": "full" + }, + "variants": { + "generic": { + "us": 2845.3, + "level": "full" + }, + "lazy_json": { + "us": 8045.7, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 1019.8, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 1019.8, + "level": "full" + }, + "variants": { + "SAX": { + "us": 1019.8, + "level": "full" + }, + "parse": { + "us": 1579.0, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 1626.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1258.2, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1258.2, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 1552.3, + "level": "no UTF-8" + }, + "SAX": { + "us": 1626.4, + "level": "full" + }, + "insitu (copy)": { + "us": 1684.4, + "level": "full" + }, + "Document (no encoding check)": { + "us": 1716.5, + "level": "no UTF-8" + }, + "Document": { + "us": 1801.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 1228.8, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 1228.8, + "level": "full" + }, + "variants": { + "visitor": { + "us": 1228.8, + "level": "full" + }, + "Value": { + "us": 2888.8, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 778.0, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 778.0, + "level": "full" + }, + "variants": { + "visitor": { + "us": 778.0, + "level": "full" + }, + "Value": { + "us": 1014.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 866.5, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 866.5, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 866.5, + "level": "full" + }, + "borrowed (copy)": { + "us": 1721.5, + "level": "full" + }, + "borrowed (reused)": { + "us": 1726.2, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1803.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1803.9, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1800.5, + "level": "full" + }, + "parse": { + "us": 1803.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 3099.6, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 3099.6, + "level": "full" + }, + "variants": { + "sax": { + "us": 3099.6, + "level": "full" + }, + "parse": { + "us": 6329.8, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1936.9, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1936.9, + "level": "full" + }, + "variants": { + "read": { + "us": 1936.9, + "level": "full" + }, + "insitu (copy)": { + "us": 1938.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 2594.0, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 2594.0, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 2593.4, + "level": "full" + }, + "DOM": { + "us": 2594.0, + "level": "full" + }, + "On-Demand": { + "us": 2602.9, + "level": "full" + }, + "On-Demand (reused)": { + "us": 2605.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 2976.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 2976.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 9777.2, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 9777.2, + "level": "full" + }, + "variants": { + "generic": { + "us": 9777.2, + "level": "full" + }, + "lazy_json": { + "us": 12003.5, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 3046.2, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 3046.2, + "level": "full" + }, + "variants": { + "SAX": { + "us": 3046.2, + "level": "full" + }, + "parse": { + "us": 4025.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 6924.1, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 6924.1, + "level": "full" + }, + "variants": { + "SAX": { + "us": 6924.1, + "level": "full" + }, + "SAX (no encoding check)": { + "us": 6935.7, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 7166.7, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 7207.5, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 7788.1, + "level": "no UTF-8" + }, + "Document": { + "us": 7797.6, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 4813.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 4813.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 4813.2, + "level": "full" + }, + "Value": { + "us": 7817.7, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 2695.0, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 2695.0, + "level": "full" + }, + "variants": { + "visitor": { + "us": 2695.0, + "level": "full" + }, + "Value": { + "us": 3710.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 2726.7, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 2726.7, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 2726.7, + "level": "full" + }, + "borrowed (reused)": { + "us": 5296.8, + "level": "full" + }, + "borrowed (copy)": { + "us": 5313.5, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 29207.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 29207.8, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 28674.4, + "level": "full" + }, + "parse": { + "us": 29207.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 63271.9, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 63271.9, + "level": "full" + }, + "variants": { + "sax": { + "us": 63271.9, + "level": "full" + }, + "parse": { + "us": 176051.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 37916.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 37916.0, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 37916.0, + "level": "full" + }, + "read": { + "us": 37930.5, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 33706.4, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 33706.4, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 33585.6, + "level": "full" + }, + "DOM": { + "us": 33706.4, + "level": "full" + }, + "On-Demand (reused)": { + "us": 34159.6, + "level": "full" + }, + "On-Demand": { + "us": 34206.4, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 48840.5, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 48840.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 151441.2, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 151441.2, + "level": "full" + }, + "variants": { + "generic": { + "us": 151441.2, + "level": "full" + }, + "lazy_json": { + "us": 154503.6, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 54817.8, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 54817.8, + "level": "full" + }, + "variants": { + "SAX": { + "us": 54817.8, + "level": "full" + }, + "parse": { + "us": 98010.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 149474.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 72381.0, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 72381.0, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 135928.1, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 149474.4, + "level": "full" + }, + "SAX": { + "us": 151362.3, + "level": "full" + }, + "Document (no encoding check)": { + "us": 152099.7, + "level": "no UTF-8" + }, + "Document": { + "us": 166281.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 66093.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 66093.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 66093.2, + "level": "full" + }, + "Value": { + "us": 182706.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 41462.0, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 41462.0, + "level": "full" + }, + "variants": { + "visitor": { + "us": 41462.0, + "level": "full" + }, + "Value": { + "us": 47602.0, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 48505.6, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 48505.6, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 48505.6, + "level": "full" + }, + "borrowed (reused)": { + "us": 66327.5, + "level": "full" + }, + "borrowed (copy)": { + "us": 66625.4, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1.2, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1.2, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1.1, + "level": "full" + }, + "parse": { + "us": 1.2, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 2.5, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 2.5, + "level": "full" + }, + "variants": { + "sax": { + "us": 2.5, + "level": "full" + }, + "parse": { + "us": 7.7, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1.1, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1.1, + "level": "full" + }, + "variants": { + "read": { + "us": 1.1, + "level": "full" + }, + "insitu (copy)": { + "us": 1.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 1.3, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 1.3, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 1.2, + "level": "full" + }, + "On-Demand (reused)": { + "us": 1.2, + "level": "full" + }, + "DOM": { + "us": 1.3, + "level": "full" + }, + "On-Demand": { + "us": 1.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1.9, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1.9, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 6.7, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 3.5, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 3.5, + "level": "partial" + }, + "generic": { + "us": 6.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 2.3, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 2.3, + "level": "full" + }, + "variants": { + "SAX": { + "us": 2.3, + "level": "full" + }, + "parse": { + "us": 4.0, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 6.1, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 2.9, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 2.9, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 5.3, + "level": "no UTF-8" + }, + "SAX": { + "us": 6.1, + "level": "full" + }, + "Document (no encoding check)": { + "us": 6.2, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 6.6, + "level": "full" + }, + "Document": { + "us": 7.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 2.5, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 2.5, + "level": "full" + }, + "variants": { + "visitor": { + "us": 2.5, + "level": "full" + }, + "Value": { + "us": 7.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 1.6, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 1.6, + "level": "full" + }, + "variants": { + "visitor": { + "us": 1.6, + "level": "full" + }, + "Value": { + "us": 2.2, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 2.0, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 2.0, + "level": "full" + }, + "borrowed (reused)": { + "us": 3.3, + "level": "full" + }, + "borrowed (copy)": { + "us": 3.6, + "level": "full" + } + } + } + } + }, + "select": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "structs (from_json)", + "us": 187.0, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 187.0, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 178.9, + "level": "full" + }, + "structs (from_json)": { + "us": 187.0, + "level": "full" + }, + "parse": { + "us": 188.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 1356.7, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 1356.7, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 1356.7, + "level": "full" + }, + "parse": { + "us": 1364.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 188.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 188.0, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 188.0, + "level": "full" + }, + "read": { + "us": 201.0, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 231.0, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 144.0, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 141.7, + "level": "partial" + }, + "On-Demand": { + "us": 144.0, + "level": "partial" + }, + "DOM (reused)": { + "us": 210.1, + "level": "full" + }, + "DOM": { + "us": 231.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 385.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 385.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 311.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 238.2, + "level": "partial" + }, + "variants": { + "structs": { + "us": 238.2, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 311.9, + "level": "full" + }, + "lazy_json": { + "us": 716.5, + "level": "partial" + }, + "generic": { + "us": 1339.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 888.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 888.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 888.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1319.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 703.2, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 703.2, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1201.8, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1319.0, + "level": "full" + }, + "Document": { + "us": 1386.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 482.8, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 415.7, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 415.7, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 482.8, + "level": "full" + }, + "Value": { + "us": 1654.8, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 340.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 340.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 340.3, + "level": "full" + }, + "structs": { + "us": 410.5, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 374.7, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 374.7, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 374.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 574.4, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 367.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 367.3, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 365.9, + "level": "full" + }, + "parse": { + "us": 367.3, + "level": "full" + }, + "structs (from_json)": { + "us": 382.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 2439.3, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 2439.3, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 2439.3, + "level": "full" + }, + "parse": { + "us": 2440.5, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 480.7, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 480.7, + "level": "full" + }, + "variants": { + "read": { + "us": 480.7, + "level": "full" + }, + "insitu (copy)": { + "us": 482.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 509.8, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 499.8, + "level": "partial" + }, + "variants": { + "DOM (reused)": { + "us": 496.9, + "level": "full" + }, + "On-Demand (reused)": { + "us": 497.6, + "level": "partial" + }, + "On-Demand": { + "us": 499.8, + "level": "partial" + }, + "DOM": { + "us": 509.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 992.3, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 992.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 872.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 252.5, + "level": "partial" + }, + "variants": { + "structs": { + "us": 252.5, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 872.9, + "level": "full" + }, + "generic": { + "us": 2776.5, + "level": "full" + }, + "lazy_json": { + "us": 5160.2, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1489.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1489.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 1489.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1571.5, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1146.5, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1146.5, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1571.5, + "level": "full" + }, + "Document (no encoding check)": { + "us": 1618.2, + "level": "no UTF-8" + }, + "Document": { + "us": 1694.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 1121.2, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1081.5, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 1081.5, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 1121.2, + "level": "full" + }, + "Value": { + "us": 2776.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 700.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 700.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 700.3, + "level": "full" + }, + "structs": { + "us": 813.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 870.6, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 870.6, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 870.6, + "level": "full" + }, + "borrowed (copy)": { + "us": 1625.3, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "structs (from_json)", + "us": 987.3, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 987.3, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 986.8, + "level": "full" + }, + "structs (from_json)": { + "us": 987.3, + "level": "full" + }, + "parse": { + "us": 988.0, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 6066.1, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 6066.1, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 6066.1, + "level": "full" + }, + "parse": { + "us": 6082.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1493.3, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1493.3, + "level": "full" + }, + "variants": { + "read": { + "us": 1493.3, + "level": "full" + }, + "insitu (copy)": { + "us": 1496.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 2104.2, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 645.5, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 644.9, + "level": "partial" + }, + "On-Demand": { + "us": 645.5, + "level": "partial" + }, + "DOM (reused)": { + "us": 2100.2, + "level": "full" + }, + "DOM": { + "us": 2104.2, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 2589.7, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 2589.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 1303.8, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 315.8, + "level": "partial" + }, + "variants": { + "structs": { + "us": 315.8, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 1303.8, + "level": "full" + }, + "lazy_json": { + "us": 1999.2, + "level": "partial" + }, + "generic": { + "us": 9439.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 3631.5, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 3631.5, + "level": "full" + }, + "variants": { + "parse": { + "us": 3631.5, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 6762.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 6762.4, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 6762.4, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 6780.9, + "level": "no UTF-8" + }, + "Document": { + "us": 7359.2, + "level": "full" + }, + "Document (no encoding check)": { + "us": 7361.9, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 1532.5, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1458.2, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 1458.2, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 1532.5, + "level": "full" + }, + "Value": { + "us": 7393.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 1938.4, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 1938.4, + "level": "full" + }, + "variants": { + "Value": { + "us": 1938.4, + "level": "full" + }, + "structs": { + "us": 2091.8, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 2660.2, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 2660.2, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 2660.2, + "level": "full" + }, + "borrowed (copy)": { + "us": 4963.5, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 24408.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 24408.9, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 23968.9, + "level": "full" + }, + "parse": { + "us": 24408.9, + "level": "full" + }, + "structs (from_json)": { + "us": 30627.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse", + "us": 179365.5, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 179365.5, + "level": "full" + }, + "variants": { + "parse": { + "us": 179365.5, + "level": "full" + }, + "structs (from_json)": { + "us": 181709.3, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 33546.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 33546.2, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 33546.2, + "level": "full" + }, + "read": { + "us": 33827.5, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 32074.8, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 18600.9, + "level": "partial" + }, + "variants": { + "On-Demand": { + "us": 18600.9, + "level": "partial" + }, + "On-Demand (reused)": { + "us": 18784.8, + "level": "partial" + }, + "DOM": { + "us": 32074.8, + "level": "full" + }, + "DOM (reused)": { + "us": 32321.7, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 46921.7, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 46921.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 51045.7, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 41037.3, + "level": "partial" + }, + "variants": { + "structs": { + "us": 41037.3, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 51045.7, + "level": "full" + }, + "lazy_json": { + "us": 105379.2, + "level": "partial" + }, + "generic": { + "us": 142630.0, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 96756.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 96756.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 96756.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 142740.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 66762.8, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 66762.8, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 142740.2, + "level": "full" + }, + "Document (no encoding check)": { + "us": 149260.4, + "level": "no UTF-8" + }, + "Document": { + "us": 162645.3, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 63634.7, + "level": "full" + }, + "best_any": { + "variant": "from_utf8 + structs", + "us": 63634.7, + "level": "full" + }, + "variants": { + "from_utf8 + structs": { + "us": 63634.7, + "level": "full" + }, + "structs": { + "us": 69672.1, + "level": "no UTF-8" + }, + "Value": { + "us": 186130.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 41202.8, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 41202.8, + "level": "full" + }, + "variants": { + "Value": { + "us": 41202.8, + "level": "full" + }, + "structs": { + "us": 54535.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 57877.0, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 57877.0, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 57877.0, + "level": "full" + }, + "borrowed (copy)": { + "us": 64256.1, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1.0, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1.0, + "level": "full" + }, + "variants": { + "parse": { + "us": 1.0, + "level": "full" + }, + "read (reused)": { + "us": 1.0, + "level": "full" + }, + "structs (from_json)": { + "us": 1.0, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 7.5, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 7.5, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 7.5, + "level": "full" + }, + "parse": { + "us": 7.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1.1, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1.1, + "level": "full" + }, + "variants": { + "read": { + "us": 1.1, + "level": "full" + }, + "insitu (copy)": { + "us": 1.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 1.2, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 0.8, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 0.7, + "level": "partial" + }, + "On-Demand": { + "us": 0.8, + "level": "partial" + }, + "DOM (reused)": { + "us": 1.1, + "level": "full" + }, + "DOM": { + "us": 1.2, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1.7, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 1.4, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1.1, + "level": "partial" + }, + "variants": { + "structs": { + "us": 1.1, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 1.4, + "level": "full" + }, + "lazy_json": { + "us": 1.9, + "level": "partial" + }, + "generic": { + "us": 7.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 3.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 3.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 3.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 6.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 2.7, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 2.7, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 6.0, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 6.4, + "level": "full" + }, + "Document": { + "us": 6.9, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 2.2, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1.9, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 1.9, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 2.2, + "level": "full" + }, + "Value": { + "us": 7.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 1.6, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1.6, + "level": "full" + }, + "variants": { + "structs": { + "us": 1.6, + "level": "full" + }, + "Value": { + "us": 1.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 2.0, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 2.0, + "level": "full" + }, + "borrowed (copy)": { + "us": 3.2, + "level": "full" + } + } + } + } + }, + "edit": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 279.6, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 279.6, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 279.6, + "level": "full" + }, + "editable": { + "us": 289.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 1269.3, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 1269.3, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 1269.3, + "level": "full" + }, + "parse": { + "us": 1614.5, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + mut copy", + "us": 437.9, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + mut copy", + "us": 437.9, + "level": "full" + }, + "variants": { + "insitu (copy) + mut copy": { + "us": 437.9, + "level": "full" + }, + "mut copy": { + "us": 456.2, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 489.5, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 489.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 1503.3, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 1503.3, + "level": "full" + }, + "variants": { + "generic": { + "us": 1503.3, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1367.2, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1367.2, + "level": "full" + }, + "variants": { + "parse": { + "us": 1367.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Document", + "us": 1917.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1348.7, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1348.7, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1754.6, + "level": "no UTF-8" + }, + "Document": { + "us": 1917.3, + "level": "full" + }, + "insitu (copy)": { + "us": 1933.7, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 2000.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 2000.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 2000.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 633.9, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 633.9, + "level": "full" + }, + "variants": { + "Value": { + "us": 633.9, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 933.5, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 933.5, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 933.5, + "level": "full" + }, + "owned (copy)": { + "us": 1366.5, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 558.7, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 558.7, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 558.7, + "level": "full" + }, + "editable": { + "us": 560.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 2376.2, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 2376.2, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 2376.2, + "level": "full" + }, + "parse": { + "us": 2730.8, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 899.9, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 899.9, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 899.9, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 903.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1227.2, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1227.2, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 3223.4, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 3223.4, + "level": "full" + }, + "variants": { + "generic": { + "us": 3223.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1999.4, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1999.4, + "level": "full" + }, + "variants": { + "parse": { + "us": 1999.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 2404.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1986.8, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1986.8, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 2404.2, + "level": "full" + }, + "Document (no encoding check)": { + "us": 2431.6, + "level": "no UTF-8" + }, + "Document": { + "us": 2524.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 3287.0, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 3287.0, + "level": "full" + }, + "variants": { + "Value": { + "us": 3287.0, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 1264.1, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 1264.1, + "level": "full" + }, + "variants": { + "Value": { + "us": 1264.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 2110.9, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 2110.9, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 2110.9, + "level": "full" + }, + "owned (copy)": { + "us": 2613.2, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 1462.5, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 1462.5, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 1462.5, + "level": "full" + }, + "editable": { + "us": 2742.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse", + "us": 8194.4, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 8194.4, + "level": "full" + }, + "variants": { + "parse": { + "us": 8194.4, + "level": "full" + }, + "ordered_json": { + "us": 8333.0, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + mut copy", + "us": 3693.8, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + mut copy", + "us": 3693.8, + "level": "full" + }, + "variants": { + "insitu (copy) + mut copy": { + "us": 3693.8, + "level": "full" + }, + "mut copy": { + "us": 3697.7, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 5655.3, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 5655.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 11125.3, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 11125.3, + "level": "full" + }, + "variants": { + "generic": { + "us": 11125.3, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 6541.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 6541.6, + "level": "full" + }, + "variants": { + "parse": { + "us": 6541.6, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 13880.1, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 13880.1, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 13880.1, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 13964.7, + "level": "no UTF-8" + }, + "Document": { + "us": 14450.3, + "level": "full" + }, + "Document (no encoding check)": { + "us": 14498.4, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 9670.1, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 9670.1, + "level": "full" + }, + "variants": { + "Value": { + "us": 9670.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 4378.8, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 4378.8, + "level": "full" + }, + "variants": { + "Value": { + "us": 4378.8, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 7695.4, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 7695.4, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 7695.4, + "level": "full" + }, + "owned (copy)": { + "us": 7696.9, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "editable", + "us": 58265.3, + "level": "full" + }, + "best_any": { + "variant": "editable", + "us": 58265.3, + "level": "full" + }, + "variants": { + "editable": { + "us": 58265.3, + "level": "full" + }, + "editable (source numbers)": { + "us": 58343.2, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 173089.2, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 173089.2, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 173089.2, + "level": "full" + }, + "parse": { + "us": 275845.7, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 84446.8, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 84446.8, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 84446.8, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 84978.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 63940.2, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 63940.2, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 187293.5, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 187293.5, + "level": "full" + }, + "variants": { + "generic": { + "us": 187293.5, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 157555.0, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 157555.0, + "level": "full" + }, + "variants": { + "parse": { + "us": 157555.0, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 224650.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 148238.6, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 148238.6, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 224099.0, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 224650.0, + "level": "full" + }, + "Document": { + "us": 238121.3, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 248681.1, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 248681.1, + "level": "full" + }, + "variants": { + "Value": { + "us": 248681.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 140693.4, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 140693.4, + "level": "full" + }, + "variants": { + "Value": { + "us": 140693.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 111832.4, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 111832.4, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 111832.4, + "level": "full" + }, + "owned (copy)": { + "us": 192828.3, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "editable", + "us": 1.9, + "level": "full" + }, + "best_any": { + "variant": "editable", + "us": 1.9, + "level": "full" + }, + "variants": { + "editable": { + "us": 1.9, + "level": "full" + }, + "editable (source numbers)": { + "us": 1.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 7.1, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 7.1, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 7.1, + "level": "full" + }, + "parse": { + "us": 8.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 2.4, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 2.4, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 2.4, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 2.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 2.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 8.2, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 8.2, + "level": "full" + }, + "variants": { + "generic": { + "us": 8.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 6.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 6.6, + "level": "full" + }, + "variants": { + "parse": { + "us": 6.6, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 10.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 6.5, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 6.5, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 9.6, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 10.3, + "level": "full" + }, + "Document": { + "us": 10.5, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 9.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 9.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 9.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 3.8, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 3.8, + "level": "full" + }, + "variants": { + "Value": { + "us": 3.8, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 5.3, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 5.3, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 5.3, + "level": "full" + }, + "owned (copy)": { + "us": 7.6, + "level": "full" + } + } + } + } + }, + "minify": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 253.5, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 253.5, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 249.9, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 253.5, + "level": "full" + }, + "parse + dump": { + "us": 263.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 1591.6, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 1591.6, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 1591.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + write", + "us": 289.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + write", + "us": 289.0, + "level": "full" + }, + "variants": { + "insitu (copy) + write": { + "us": 289.0, + "level": "full" + }, + "read + write": { + "us": 305.5, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 589.5, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 65.0, + "level": "partial" + }, + "variants": { + "minify": { + "us": 65.0, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 566.1, + "level": "full" + }, + "DOM + to_string": { + "us": 589.5, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 496.8, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 496.8, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 1488.2, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 283.1, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 283.1, + "level": "partial" + }, + "generic": { + "us": 1488.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 1391.4, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 1391.4, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 1391.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 1497.0, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 1309.7, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 1309.7, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 1331.0, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 1497.0, + "level": "full" + }, + "SAX to Writer (raw numbers)": { + "us": 1516.0, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 1792.6, + "level": "no UTF-8" + }, + "Document + Writer": { + "us": 1968.7, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 1999.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 1999.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 1999.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 545.8, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 545.8, + "level": "full" + }, + "variants": { + "Value": { + "us": 545.8, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 958.7, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 958.7, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 958.7, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 491.9, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 491.9, + "level": "full" + }, + "variants": { + "parse + dump (source numbers)": { + "us": 491.9, + "level": "full" + }, + "read + dump (reused)": { + "us": 493.6, + "level": "full" + }, + "parse + dump": { + "us": 495.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 2694.2, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 2694.2, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 2694.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + write", + "us": 640.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + write", + "us": 640.0, + "level": "full" + }, + "variants": { + "insitu (copy) + write": { + "us": 640.0, + "level": "full" + }, + "read + write": { + "us": 642.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 989.6, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 177.8, + "level": "partial" + }, + "variants": { + "minify": { + "us": 177.8, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 981.2, + "level": "full" + }, + "DOM + to_string": { + "us": 989.6, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 1219.0, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 1219.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 3208.1, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 740.4, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 740.4, + "level": "partial" + }, + "generic": { + "us": 3208.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 1986.8, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 1986.8, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 1986.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 1796.8, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 1698.6, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 1698.6, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 1796.8, + "level": "full" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 1942.8, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 2045.4, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 2431.0, + "level": "no UTF-8" + }, + "Document + Writer": { + "us": 2519.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 3239.8, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 3239.8, + "level": "full" + }, + "variants": { + "Value": { + "us": 3239.8, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 1138.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 1138.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 1138.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 2097.0, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 2097.0, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 2097.0, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 1341.0, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 1341.0, + "level": "full" + }, + "variants": { + "parse + dump (source numbers)": { + "us": 1341.0, + "level": "full" + }, + "parse + dump": { + "us": 2566.2, + "level": "full" + }, + "read + dump (reused)": { + "us": 2566.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 8279.6, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 8279.6, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 8279.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 3212.9, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 3212.9, + "level": "full" + }, + "variants": { + "read + write": { + "us": 3212.9, + "level": "full" + }, + "insitu (copy) + write": { + "us": 3216.8, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 8949.4, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 235.7, + "level": "partial" + }, + "variants": { + "minify": { + "us": 235.7, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 8934.7, + "level": "full" + }, + "DOM + to_string": { + "us": 8949.4, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 5657.8, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 5657.8, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 11075.5, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 1808.5, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 1808.5, + "level": "partial" + }, + "generic": { + "us": 11075.5, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 6585.9, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 6585.9, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 6585.9, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer (raw numbers)", + "us": 10856.1, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (raw numbers)", + "us": 10856.1, + "level": "full" + }, + "variants": { + "SAX to Writer (raw numbers)": { + "us": 10856.1, + "level": "full" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 10926.6, + "level": "no UTF-8" + }, + "Document + Writer": { + "us": 14455.2, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 14508.8, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 15537.8, + "level": "full" + }, + "SAX to Writer (no encoding check)": { + "us": 15564.8, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 9748.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 9748.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 9748.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 4365.8, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 4365.8, + "level": "full" + }, + "variants": { + "Value": { + "us": 4365.8, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 7743.3, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 7743.3, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 7743.3, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 37792.5, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 37792.5, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 37330.5, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 37792.5, + "level": "full" + }, + "parse + dump": { + "us": 37935.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 200923.1, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 200923.1, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 200923.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 50740.5, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 50740.5, + "level": "full" + }, + "variants": { + "read + write": { + "us": 50740.5, + "level": "full" + }, + "insitu (copy) + write": { + "us": 50812.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 82231.7, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 5929.0, + "level": "partial" + }, + "variants": { + "minify": { + "us": 5929.0, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 82027.3, + "level": "full" + }, + "DOM + to_string": { + "us": 82231.7, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 61948.5, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 61948.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 172917.3, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 39975.5, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 39975.5, + "level": "partial" + }, + "generic": { + "us": 172917.3, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 154714.4, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 154714.4, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 154714.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 181502.0, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (raw numbers) (no encoding check)", + "us": 167460.8, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 167460.8, + "level": "no UTF-8" + }, + "SAX to Writer (no encoding check)": { + "us": 167920.2, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 181502.0, + "level": "full" + }, + "SAX to Writer (raw numbers)": { + "us": 182128.9, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 227713.6, + "level": "no UTF-8" + }, + "Document + Writer": { + "us": 242784.5, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 227300.9, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 227300.9, + "level": "full" + }, + "variants": { + "Value": { + "us": 227300.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 64830.1, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 64830.1, + "level": "full" + }, + "variants": { + "Value": { + "us": 64830.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 107444.2, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 107444.2, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 107444.2, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump", + "us": 1.5, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 1.5, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 1.4, + "level": "full" + }, + "parse + dump": { + "us": 1.5, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 1.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 8.5, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 8.5, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 8.5, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 1.6, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 1.6, + "level": "full" + }, + "variants": { + "read + write": { + "us": 1.6, + "level": "full" + }, + "insitu (copy) + write": { + "us": 1.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 3.7, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 0.3, + "level": "partial" + }, + "variants": { + "minify": { + "us": 0.3, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 3.5, + "level": "full" + }, + "DOM + to_string": { + "us": 3.7, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 2.5, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 2.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 7.8, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 1.3, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 1.3, + "level": "partial" + }, + "generic": { + "us": 7.8, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 6.8, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 6.8, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 6.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 8.0, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 7.3, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 7.3, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 7.5, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 8.0, + "level": "full" + }, + "SAX to Writer (raw numbers)": { + "us": 8.2, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 9.8, + "level": "no UTF-8" + }, + "Document + Writer": { + "us": 10.7, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 9.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 9.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 9.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2.9, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 2.9, + "level": "full" + }, + "variants": { + "Value": { + "us": 2.9, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 5.4, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 5.4, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 5.4, + "level": "full" + } + } + } + } + }, + "write": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 73.6, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 73.6, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 73.6, + "level": "n/a" + }, + "dump": { + "us": 75.2, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 220.0, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 220.0, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 220.0, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 103.6, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 103.6, + "level": "n/a" + }, + "variants": { + "write": { + "us": 103.6, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 352.5, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 352.5, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 352.5, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 592.5, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 592.5, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 592.5, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 110.7, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 110.7, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 110.7, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 211.7, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 211.7, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 211.7, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 498.7, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 498.7, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 498.7, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 327.1, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 327.1, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 327.1, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 213.5, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 213.5, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 213.5, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 363.5, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 363.5, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 363.5, + "level": "n/a" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 133.9, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 133.9, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 133.9, + "level": "n/a" + }, + "dump": { + "us": 136.2, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 286.0, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 286.0, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 286.0, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 164.1, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 164.1, + "level": "n/a" + }, + "variants": { + "write": { + "us": 164.1, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 493.9, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 493.9, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 493.9, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 817.9, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 817.9, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 817.9, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 231.0, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 231.0, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 231.0, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 469.3, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 469.3, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 469.3, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 502.8, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 502.8, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 502.8, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 504.0, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 504.0, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 504.0, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 454.3, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 454.3, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 454.3, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 496.0, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 496.0, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 496.0, + "level": "n/a" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 397.5, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 397.5, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 397.5, + "level": "n/a" + }, + "dump": { + "us": 1620.8, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 2239.6, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 2239.6, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 2239.6, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 1716.9, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 1716.9, + "level": "n/a" + }, + "variants": { + "write": { + "us": 1716.9, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 6770.4, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 6770.4, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 6770.4, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 6947.2, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 6947.2, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 6947.2, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 3047.4, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 3047.4, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 3047.4, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 1691.6, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 1691.6, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 1691.6, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 2868.0, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 2868.0, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 2868.0, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 2257.0, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 2257.0, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 2257.0, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2414.0, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 2414.0, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 2414.0, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 2723.0, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 2723.0, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 2723.0, + "level": "n/a" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 14781.2, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 14781.2, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 14781.2, + "level": "n/a" + }, + "dump": { + "us": 14845.7, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 30983.4, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 30983.4, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 30983.4, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 20118.7, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 20118.7, + "level": "n/a" + }, + "variants": { + "write": { + "us": 20118.7, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 54528.2, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 54528.2, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 54528.2, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 81580.0, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 81580.0, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 81580.0, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 20341.8, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 20341.8, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 20341.8, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 34921.0, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 34921.0, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 34921.0, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 62963.8, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 62963.8, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 62963.8, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 49857.2, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 49857.2, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 49857.2, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 33358.5, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 33358.5, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 33358.5, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 48114.1, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 48114.1, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 48114.1, + "level": "n/a" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "dump", + "us": 0.5, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 0.5, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 0.5, + "level": "n/a" + }, + "dump (source numbers)": { + "us": 0.5, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 1.2, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 1.2, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 1.2, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 0.7, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 0.7, + "level": "n/a" + }, + "variants": { + "write": { + "us": 0.7, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 2.5, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 2.5, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 2.5, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 3.8, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 3.8, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 3.8, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 0.9, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 0.9, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 0.9, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 1.3, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 1.3, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 1.3, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 2.8, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 2.8, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 2.8, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 2.0, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 2.0, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 2.0, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 1.4, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 1.4, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 1.4, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 1.8, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 1.8, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 1.8, + "level": "n/a" + } + } + } + } + } +} diff --git a/docs/mkdocs/scripts/figures/data/perf_usecases_x86-clang.json b/docs/mkdocs/scripts/figures/data/perf_usecases_x86-clang.json new file mode 100644 index 000000000..19a29ef0e --- /dev/null +++ b/docs/mkdocs/scripts/figures/data/perf_usecases_x86-clang.json @@ -0,0 +1,7224 @@ +{ + "validate": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 301.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 301.9, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 294.2, + "level": "full" + }, + "parse": { + "us": 301.9, + "level": "full" + }, + "accept": { + "us": 306.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 746.3, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 746.3, + "level": "full" + }, + "variants": { + "accept": { + "us": 746.3, + "level": "full" + }, + "parse": { + "us": 3621.8, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 378.8, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 378.8, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 378.8, + "level": "full" + }, + "read": { + "us": 382.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 311.3, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 311.3, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 307.1, + "level": "full" + }, + "DOM": { + "us": 311.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 449.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 449.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 621.2, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 621.2, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 621.2, + "level": "full" + }, + "generic": { + "us": 3963.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 595.8, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 595.8, + "level": "full" + }, + "variants": { + "SAX": { + "us": 595.8, + "level": "full" + }, + "parse": { + "us": 1224.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1845.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1227.3, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1227.3, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 1303.4, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1603.8, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1845.2, + "level": "full" + }, + "SAX": { + "us": 2180.5, + "level": "full" + }, + "Document": { + "us": 2338.1, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 633.5, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 486.9, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 486.9, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 633.5, + "level": "full" + }, + "Value": { + "us": 3815.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 469.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 469.6, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 469.6, + "level": "full" + }, + "Value": { + "us": 563.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 591.5, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 591.5, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 578.1, + "level": "full" + }, + "tape (copy)": { + "us": 591.5, + "level": "full" + }, + "borrowed (copy)": { + "us": 1281.8, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 720.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 720.3, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 718.8, + "level": "full" + }, + "parse": { + "us": 720.3, + "level": "full" + }, + "accept": { + "us": 722.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 1424.2, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 1424.2, + "level": "full" + }, + "variants": { + "accept": { + "us": 1424.2, + "level": "full" + }, + "parse": { + "us": 5667.8, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 895.6, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 895.6, + "level": "full" + }, + "variants": { + "read": { + "us": 895.6, + "level": "full" + }, + "insitu (copy)": { + "us": 898.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 735.5, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 735.5, + "level": "full" + }, + "variants": { + "DOM": { + "us": 735.5, + "level": "full" + }, + "DOM (reused)": { + "us": 759.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1026.3, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1026.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 1402.4, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 1402.4, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 1402.4, + "level": "full" + }, + "generic": { + "us": 7390.0, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 923.4, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 923.4, + "level": "full" + }, + "variants": { + "SAX": { + "us": 923.4, + "level": "full" + }, + "parse": { + "us": 1658.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 2149.5, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 1665.3, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 1665.3, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 2037.7, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 2060.5, + "level": "no UTF-8" + }, + "SAX": { + "us": 2149.5, + "level": "full" + }, + "insitu (copy)": { + "us": 2424.6, + "level": "full" + }, + "Document": { + "us": 2460.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 1447.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1370.5, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 1370.5, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 1447.6, + "level": "full" + }, + "Value": { + "us": 6238.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 965.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 965.6, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 965.6, + "level": "full" + }, + "Value": { + "us": 1189.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 1425.7, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 1425.7, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 1409.5, + "level": "full" + }, + "tape (copy)": { + "us": 1425.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 3637.0, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1783.7, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1783.7, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1776.8, + "level": "full" + }, + "parse": { + "us": 1783.7, + "level": "full" + }, + "accept": { + "us": 1787.4, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 4200.8, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 4200.8, + "level": "full" + }, + "variants": { + "accept": { + "us": 4200.8, + "level": "full" + }, + "parse": { + "us": 12011.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 2851.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 2851.4, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 2851.4, + "level": "full" + }, + "read": { + "us": 2856.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 3343.0, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 3343.0, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 3285.4, + "level": "full" + }, + "DOM": { + "us": 3343.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3140.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3140.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 1805.5, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 1805.5, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 1805.5, + "level": "full" + }, + "generic": { + "us": 26132.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 6234.3, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 6234.3, + "level": "full" + }, + "variants": { + "SAX": { + "us": 6234.3, + "level": "full" + }, + "parse": { + "us": 7192.5, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 11718.7, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 11600.8, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 11600.8, + "level": "no UTF-8" + }, + "SAX": { + "us": 11718.7, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 11728.7, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 11852.8, + "level": "full" + }, + "Document": { + "us": 12506.9, + "level": "full" + }, + "Document (no encoding check)": { + "us": 12664.2, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 2401.7, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 2318.5, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 2318.5, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 2401.7, + "level": "full" + }, + "Value": { + "us": 13367.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 2249.4, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 2249.4, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 2249.4, + "level": "full" + }, + "Value": { + "us": 3754.2, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 4302.9, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 4302.9, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 4245.2, + "level": "full" + }, + "tape (copy)": { + "us": 4302.9, + "level": "full" + }, + "borrowed (copy)": { + "us": 10036.5, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 81369.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 81369.6, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 43820.9, + "level": "full" + }, + "parse": { + "us": 81369.6, + "level": "full" + }, + "accept": { + "us": 82844.4, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 100878.3, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 100878.3, + "level": "full" + }, + "variants": { + "accept": { + "us": 100878.3, + "level": "full" + }, + "parse": { + "us": 566744.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 124180.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 124180.2, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 124180.2, + "level": "full" + }, + "read": { + "us": 126846.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 115626.5, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 115626.5, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 49170.2, + "level": "full" + }, + "DOM": { + "us": 115626.5, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 98200.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 98200.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 76163.6, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 76163.6, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 76163.6, + "level": "full" + }, + "generic": { + "us": 483058.9, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 56653.7, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 56653.7, + "level": "full" + }, + "variants": { + "SAX": { + "us": 56653.7, + "level": "full" + }, + "parse": { + "us": 184353.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 233417.1, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 156744.4, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 156744.4, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 173543.2, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 189439.3, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 233417.1, + "level": "full" + }, + "SAX": { + "us": 249262.4, + "level": "full" + }, + "Document": { + "us": 272448.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 66822.2, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 59800.9, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 59800.9, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 66822.2, + "level": "full" + }, + "Value": { + "us": 490960.4, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 54246.3, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 54246.3, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 54246.3, + "level": "full" + }, + "Value": { + "us": 117743.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 211715.5, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 211715.5, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 135460.9, + "level": "full" + }, + "tape (copy)": { + "us": 211715.5, + "level": "full" + }, + "borrowed (copy)": { + "us": 289558.6, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "accept", + "us": 1.5, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 1.5, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1.3, + "level": "full" + }, + "accept": { + "us": 1.5, + "level": "full" + }, + "parse": { + "us": 1.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 4.1, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 4.1, + "level": "full" + }, + "variants": { + "accept": { + "us": 4.1, + "level": "full" + }, + "parse": { + "us": 16.8, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1.6, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1.6, + "level": "full" + }, + "variants": { + "read": { + "us": 1.6, + "level": "full" + }, + "insitu (copy)": { + "us": 1.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 1.8, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 1.8, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 1.5, + "level": "full" + }, + "DOM": { + "us": 1.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 2.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 2.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 2.6, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 2.6, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 2.6, + "level": "full" + }, + "generic": { + "us": 17.5, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 2.4, + "level": "full" + }, + "variants": { + "SAX": { + "us": 2.4, + "level": "full" + }, + "parse": { + "us": 6.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 8.6, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 4.3, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 4.3, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 7.2, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 8.4, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 8.6, + "level": "full" + }, + "SAX": { + "us": 10.9, + "level": "full" + }, + "Document": { + "us": 12.2, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1.9, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 1.9, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 2.4, + "level": "full" + }, + "Value": { + "us": 12.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 1.8, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1.8, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 1.8, + "level": "full" + }, + "Value": { + "us": 2.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 2.8, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 2.8, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 2.4, + "level": "full" + }, + "tape (copy)": { + "us": 2.8, + "level": "full" + }, + "borrowed (copy)": { + "us": 5.3, + "level": "full" + } + } + } + } + }, + "sum": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 377.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 377.8, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 364.5, + "level": "full" + }, + "parse": { + "us": 377.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 783.9, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 783.9, + "level": "full" + }, + "variants": { + "sax": { + "us": 783.9, + "level": "full" + }, + "parse": { + "us": 3831.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 434.6, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 434.6, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 434.6, + "level": "full" + }, + "read": { + "us": 438.2, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 399.0, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 399.0, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 393.4, + "level": "full" + }, + "DOM": { + "us": 399.0, + "level": "full" + }, + "On-Demand (reused)": { + "us": 565.5, + "level": "full" + }, + "On-Demand": { + "us": 569.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 504.3, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 504.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 3889.8, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 2829.3, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 2829.3, + "level": "partial" + }, + "generic": { + "us": 3889.8, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 581.7, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 581.7, + "level": "full" + }, + "variants": { + "SAX": { + "us": 581.7, + "level": "full" + }, + "parse": { + "us": 1281.1, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1868.6, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1236.8, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1236.8, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 1351.9, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1558.1, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1868.6, + "level": "full" + }, + "SAX": { + "us": 2102.7, + "level": "full" + }, + "Document": { + "us": 2243.2, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 1318.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 1318.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 1318.2, + "level": "full" + }, + "Value": { + "us": 4058.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 494.3, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 494.3, + "level": "full" + }, + "variants": { + "visitor": { + "us": 494.3, + "level": "full" + }, + "Value": { + "us": 808.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 722.1, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 722.1, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 722.1, + "level": "full" + }, + "borrowed (reused)": { + "us": 1451.8, + "level": "full" + }, + "borrowed (copy)": { + "us": 1475.4, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 891.0, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 891.0, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 887.8, + "level": "full" + }, + "parse": { + "us": 891.0, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 1466.5, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 1466.5, + "level": "full" + }, + "variants": { + "sax": { + "us": 1466.5, + "level": "full" + }, + "parse": { + "us": 5870.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 1048.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 1048.4, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 1048.4, + "level": "full" + }, + "read": { + "us": 1054.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 946.1, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 946.1, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 939.8, + "level": "full" + }, + "DOM": { + "us": 946.1, + "level": "full" + }, + "On-Demand (reused)": { + "us": 1344.0, + "level": "full" + }, + "On-Demand": { + "us": 1357.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1180.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1180.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 7282.0, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 7282.0, + "level": "full" + }, + "variants": { + "generic": { + "us": 7282.0, + "level": "full" + }, + "lazy_json": { + "us": 10912.0, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 927.1, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 927.1, + "level": "full" + }, + "variants": { + "SAX": { + "us": 927.1, + "level": "full" + }, + "parse": { + "us": 1819.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 2171.6, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 1769.8, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 1769.8, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 2099.5, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 2160.2, + "level": "no UTF-8" + }, + "SAX": { + "us": 2171.6, + "level": "full" + }, + "insitu (copy)": { + "us": 2482.4, + "level": "full" + }, + "Document": { + "us": 2632.9, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 2298.7, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 2298.7, + "level": "full" + }, + "variants": { + "visitor": { + "us": 2298.7, + "level": "full" + }, + "Value": { + "us": 6416.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 1134.9, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 1134.9, + "level": "full" + }, + "variants": { + "visitor": { + "us": 1134.9, + "level": "full" + }, + "Value": { + "us": 1798.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 1685.7, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 1685.7, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 1685.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 3825.0, + "level": "full" + }, + "borrowed (reused)": { + "us": 3865.2, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 4150.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 4150.6, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 4119.7, + "level": "full" + }, + "parse": { + "us": 4150.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 5344.7, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 5344.7, + "level": "full" + }, + "variants": { + "sax": { + "us": 5344.7, + "level": "full" + }, + "parse": { + "us": 12267.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 3467.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 3467.4, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 3467.4, + "level": "full" + }, + "read": { + "us": 3487.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 4100.1, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 4100.1, + "level": "full" + }, + "variants": { + "DOM": { + "us": 4100.1, + "level": "full" + }, + "DOM (reused)": { + "us": 4105.9, + "level": "full" + }, + "On-Demand (reused)": { + "us": 5932.2, + "level": "full" + }, + "On-Demand": { + "us": 6036.4, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3736.5, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3736.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 25797.9, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 17578.3, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 17578.3, + "level": "partial" + }, + "generic": { + "us": 25797.9, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 5934.9, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 5934.9, + "level": "full" + }, + "variants": { + "SAX": { + "us": 5934.9, + "level": "full" + }, + "parse": { + "us": 7638.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 12183.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 12081.5, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 12081.5, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 12110.1, + "level": "no UTF-8" + }, + "SAX": { + "us": 12183.3, + "level": "full" + }, + "insitu (copy)": { + "us": 12315.6, + "level": "full" + }, + "Document": { + "us": 13053.7, + "level": "full" + }, + "Document (no encoding check)": { + "us": 13070.9, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 7610.4, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 7610.4, + "level": "full" + }, + "variants": { + "visitor": { + "us": 7610.4, + "level": "full" + }, + "Value": { + "us": 14578.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 4580.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 4580.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 4580.2, + "level": "full" + }, + "Value": { + "us": 7489.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 5190.9, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 5190.9, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 5190.9, + "level": "full" + }, + "borrowed (reused)": { + "us": 11384.6, + "level": "full" + }, + "borrowed (copy)": { + "us": 11483.9, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 89688.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 89688.9, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 55164.4, + "level": "full" + }, + "parse": { + "us": 89688.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 101437.1, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 101437.1, + "level": "full" + }, + "variants": { + "sax": { + "us": 101437.1, + "level": "full" + }, + "parse": { + "us": 624696.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 135382.1, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 135382.1, + "level": "full" + }, + "variants": { + "read": { + "us": 135382.1, + "level": "full" + }, + "insitu (copy)": { + "us": 136448.0, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 120055.8, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 120055.8, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 65216.0, + "level": "full" + }, + "On-Demand (reused)": { + "us": 77126.3, + "level": "full" + }, + "On-Demand": { + "us": 120055.8, + "level": "full" + }, + "DOM": { + "us": 131813.5, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 110323.5, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 110323.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 501804.9, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 223672.4, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 223672.4, + "level": "partial" + }, + "generic": { + "us": 501804.9, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 56310.4, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 56310.4, + "level": "full" + }, + "variants": { + "SAX": { + "us": 56310.4, + "level": "full" + }, + "parse": { + "us": 205611.0, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 253074.6, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 163825.6, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 163825.6, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 187363.2, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 199547.1, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 253074.6, + "level": "full" + }, + "SAX": { + "us": 254345.5, + "level": "full" + }, + "Document": { + "us": 289092.1, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 123810.1, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 123810.1, + "level": "full" + }, + "variants": { + "visitor": { + "us": 123810.1, + "level": "full" + }, + "Value": { + "us": 526223.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 59149.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 59149.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 59149.2, + "level": "full" + }, + "Value": { + "us": 150764.0, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 220581.9, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 220581.9, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 220581.9, + "level": "full" + }, + "borrowed (reused)": { + "us": 228425.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 293609.3, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1.9, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1.8, + "level": "full" + }, + "parse": { + "us": 1.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 4.1, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 4.1, + "level": "full" + }, + "variants": { + "sax": { + "us": 4.1, + "level": "full" + }, + "parse": { + "us": 15.9, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 1.9, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 1.9, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 1.9, + "level": "full" + }, + "read": { + "us": 2.0, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 2.2, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 2.2, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 1.9, + "level": "full" + }, + "DOM": { + "us": 2.2, + "level": "full" + }, + "On-Demand (reused)": { + "us": 2.8, + "level": "full" + }, + "On-Demand": { + "us": 3.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 2.2, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 2.2, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 16.7, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 5.9, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 5.9, + "level": "partial" + }, + "generic": { + "us": 16.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 2.4, + "level": "full" + }, + "variants": { + "SAX": { + "us": 2.4, + "level": "full" + }, + "parse": { + "us": 6.1, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 8.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 4.4, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 4.4, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 6.7, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 8.1, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 8.4, + "level": "full" + }, + "SAX": { + "us": 10.7, + "level": "full" + }, + "Document": { + "us": 11.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 4.3, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 4.3, + "level": "full" + }, + "variants": { + "visitor": { + "us": 4.3, + "level": "full" + }, + "Value": { + "us": 12.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 2.4, + "level": "full" + }, + "variants": { + "visitor": { + "us": 2.4, + "level": "full" + }, + "Value": { + "us": 4.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 3.8, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 3.8, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 3.8, + "level": "full" + }, + "borrowed (reused)": { + "us": 5.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 6.3, + "level": "full" + } + } + } + } + }, + "select": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 324.1, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 324.1, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 312.4, + "level": "full" + }, + "parse": { + "us": 324.1, + "level": "full" + }, + "structs (from_json)": { + "us": 325.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse", + "us": 3653.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 3653.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 3653.8, + "level": "full" + }, + "structs (from_json)": { + "us": 3684.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 387.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 387.3, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 387.3, + "level": "full" + }, + "read": { + "us": 392.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 330.3, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 210.3, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 206.7, + "level": "partial" + }, + "On-Demand": { + "us": 210.3, + "level": "partial" + }, + "DOM (reused)": { + "us": 324.5, + "level": "full" + }, + "DOM": { + "us": 330.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 460.7, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 460.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 559.5, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 345.1, + "level": "partial" + }, + "variants": { + "structs": { + "us": 345.1, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 559.5, + "level": "full" + }, + "lazy_json": { + "us": 793.4, + "level": "partial" + }, + "generic": { + "us": 4014.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1263.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1263.6, + "level": "full" + }, + "variants": { + "parse": { + "us": 1263.6, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1900.9, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1251.0, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1251.0, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1501.8, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1900.9, + "level": "full" + }, + "Document": { + "us": 2250.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 769.2, + "level": "full" + }, + "best_any": { + "variant": "from_utf8 + structs", + "us": 769.2, + "level": "full" + }, + "variants": { + "from_utf8 + structs": { + "us": 769.2, + "level": "full" + }, + "structs": { + "us": 812.9, + "level": "no UTF-8" + }, + "Value": { + "us": 4230.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 556.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 556.9, + "level": "full" + }, + "variants": { + "structs": { + "us": 556.9, + "level": "full" + }, + "Value": { + "us": 632.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 729.9, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 729.9, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 729.9, + "level": "full" + }, + "borrowed (copy)": { + "us": 1364.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 728.4, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 728.4, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 726.0, + "level": "full" + }, + "parse": { + "us": 728.4, + "level": "full" + }, + "structs (from_json)": { + "us": 774.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse", + "us": 5493.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 5493.9, + "level": "full" + }, + "variants": { + "parse": { + "us": 5493.9, + "level": "full" + }, + "structs (from_json)": { + "us": 5527.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 900.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 900.3, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 900.3, + "level": "full" + }, + "read": { + "us": 904.2, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 743.3, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 609.7, + "level": "partial" + }, + "variants": { + "On-Demand": { + "us": 609.7, + "level": "partial" + }, + "On-Demand (reused)": { + "us": 612.8, + "level": "partial" + }, + "DOM (reused)": { + "us": 741.1, + "level": "full" + }, + "DOM": { + "us": 743.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1024.3, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1024.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 1329.0, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 424.0, + "level": "partial" + }, + "variants": { + "structs": { + "us": 424.0, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 1329.0, + "level": "full" + }, + "lazy_json": { + "us": 6523.9, + "level": "partial" + }, + "generic": { + "us": 7022.3, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1658.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1658.9, + "level": "full" + }, + "variants": { + "parse": { + "us": 1658.9, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 2328.9, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1936.3, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1936.3, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1997.3, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 2328.9, + "level": "full" + }, + "Document": { + "us": 2472.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 1503.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1472.7, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 1472.7, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 1503.9, + "level": "full" + }, + "Value": { + "us": 6038.8, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 1022.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1022.9, + "level": "full" + }, + "variants": { + "structs": { + "us": 1022.9, + "level": "full" + }, + "Value": { + "us": 1200.9, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 1658.4, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 1658.4, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 1658.4, + "level": "full" + }, + "borrowed (copy)": { + "us": 3571.2, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "structs (from_json)", + "us": 1784.2, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 1784.2, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1774.9, + "level": "full" + }, + "structs (from_json)": { + "us": 1784.2, + "level": "full" + }, + "parse": { + "us": 1785.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 11582.9, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 11582.9, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 11582.9, + "level": "full" + }, + "parse": { + "us": 11983.5, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 2814.4, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 2814.4, + "level": "full" + }, + "variants": { + "read": { + "us": 2814.4, + "level": "full" + }, + "insitu (copy)": { + "us": 2824.2, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 3290.8, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 861.0, + "level": "partial" + }, + "variants": { + "On-Demand": { + "us": 861.0, + "level": "partial" + }, + "On-Demand (reused)": { + "us": 864.4, + "level": "partial" + }, + "DOM (reused)": { + "us": 3282.5, + "level": "full" + }, + "DOM": { + "us": 3290.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3030.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3030.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 1779.8, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 463.3, + "level": "partial" + }, + "variants": { + "structs": { + "us": 463.3, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 1779.8, + "level": "full" + }, + "lazy_json": { + "us": 2724.1, + "level": "partial" + }, + "generic": { + "us": 25691.0, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 7172.7, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 7172.7, + "level": "full" + }, + "variants": { + "parse": { + "us": 7172.7, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 11813.5, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 11564.9, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 11564.9, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 11813.5, + "level": "full" + }, + "Document": { + "us": 12192.2, + "level": "full" + }, + "Document (no encoding check)": { + "us": 12503.6, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 2442.0, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 2322.9, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 2322.9, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 2442.0, + "level": "full" + }, + "Value": { + "us": 13892.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 2246.6, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 2246.6, + "level": "full" + }, + "variants": { + "structs": { + "us": 2246.6, + "level": "full" + }, + "Value": { + "us": 3718.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 4915.3, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 4915.3, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 4915.3, + "level": "full" + }, + "borrowed (copy)": { + "us": 10315.4, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 89730.7, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 89730.7, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 54161.1, + "level": "full" + }, + "parse": { + "us": 89730.7, + "level": "full" + }, + "structs (from_json)": { + "us": 108169.2, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 641176.3, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 641176.3, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 641176.3, + "level": "full" + }, + "parse": { + "us": 651580.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 139633.8, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 139633.8, + "level": "full" + }, + "variants": { + "read": { + "us": 139633.8, + "level": "full" + }, + "insitu (copy)": { + "us": 143534.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 129469.9, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 48547.8, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 29787.0, + "level": "partial" + }, + "On-Demand": { + "us": 48547.8, + "level": "partial" + }, + "DOM (reused)": { + "us": 62947.0, + "level": "full" + }, + "DOM": { + "us": 129469.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 109906.3, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 109906.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 93673.6, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 76185.7, + "level": "partial" + }, + "variants": { + "structs": { + "us": 76185.7, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 93673.6, + "level": "full" + }, + "lazy_json": { + "us": 106237.4, + "level": "partial" + }, + "generic": { + "us": 493089.6, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 202455.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 202455.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 202455.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 251223.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 181143.6, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 181143.6, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 198185.5, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 251223.0, + "level": "full" + }, + "Document": { + "us": 285738.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 108385.8, + "level": "full" + }, + "best_any": { + "variant": "from_utf8 + structs", + "us": 108385.8, + "level": "full" + }, + "variants": { + "from_utf8 + structs": { + "us": 108385.8, + "level": "full" + }, + "structs": { + "us": 138827.1, + "level": "no UTF-8" + }, + "Value": { + "us": 560794.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 91995.7, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 91995.7, + "level": "full" + }, + "variants": { + "structs": { + "us": 91995.7, + "level": "full" + }, + "Value": { + "us": 145370.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 266072.7, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 266072.7, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 266072.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 328257.2, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1.6, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1.5, + "level": "full" + }, + "parse": { + "us": 1.6, + "level": "full" + }, + "structs (from_json)": { + "us": 1.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 15.2, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 15.2, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 15.2, + "level": "full" + }, + "parse": { + "us": 15.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1.7, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1.7, + "level": "full" + }, + "variants": { + "read": { + "us": 1.7, + "level": "full" + }, + "insitu (copy)": { + "us": 1.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 1.3, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 1.0, + "level": "partial" + }, + "On-Demand": { + "us": 1.3, + "level": "partial" + }, + "DOM (reused)": { + "us": 1.6, + "level": "full" + }, + "DOM": { + "us": 2.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 2.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 2.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 2.2, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1.7, + "level": "partial" + }, + "variants": { + "structs": { + "us": 1.7, + "level": "partial" + }, + "lazy_json": { + "us": 2.0, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 2.2, + "level": "full" + }, + "generic": { + "us": 17.5, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 5.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 5.9, + "level": "full" + }, + "variants": { + "parse": { + "us": 5.9, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 8.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 4.3, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 4.3, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 7.9, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 8.2, + "level": "full" + }, + "Document": { + "us": 11.6, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 3.1, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 3.0, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 3.0, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 3.1, + "level": "full" + }, + "Value": { + "us": 14.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 2.0, + "level": "full" + }, + "variants": { + "structs": { + "us": 2.0, + "level": "full" + }, + "Value": { + "us": 2.8, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 3.6, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 3.6, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 3.6, + "level": "full" + }, + "borrowed (copy)": { + "us": 5.4, + "level": "full" + } + } + } + } + }, + "edit": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 523.7, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 523.7, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 523.7, + "level": "full" + }, + "editable": { + "us": 534.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 3058.0, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 3058.0, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 3058.0, + "level": "full" + }, + "parse": { + "us": 4426.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 911.7, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 911.7, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 911.7, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 915.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 644.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 644.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 4277.9, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 4277.9, + "level": "full" + }, + "variants": { + "generic": { + "us": 4277.9, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1722.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1722.3, + "level": "full" + }, + "variants": { + "parse": { + "us": 1722.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 2564.6, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1902.5, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1902.5, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 2091.8, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 2564.6, + "level": "full" + }, + "Document": { + "us": 2933.2, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 4474.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 4474.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 4474.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 1188.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 1188.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 1188.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 2071.4, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 2071.4, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 2071.4, + "level": "full" + }, + "owned (copy)": { + "us": 2880.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 1093.2, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 1093.2, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 1093.2, + "level": "full" + }, + "editable": { + "us": 1099.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 5099.3, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 5099.3, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 5099.3, + "level": "full" + }, + "parse": { + "us": 6414.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 1686.5, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 1686.5, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 1686.5, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 1717.5, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1508.3, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1508.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 7988.6, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 7988.6, + "level": "full" + }, + "variants": { + "generic": { + "us": 7988.6, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 2613.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 2613.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 2613.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 3328.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 2859.3, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 2859.3, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 2942.8, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 3328.2, + "level": "full" + }, + "Document": { + "us": 3389.9, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 6922.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 6922.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 6922.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2383.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 2383.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 2383.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 4465.1, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 4465.1, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 4465.1, + "level": "full" + }, + "owned (copy)": { + "us": 5204.4, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 2866.5, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 2866.5, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 2866.5, + "level": "full" + }, + "editable": { + "us": 5935.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse", + "us": 16378.1, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 16378.1, + "level": "full" + }, + "variants": { + "parse": { + "us": 16378.1, + "level": "full" + }, + "ordered_json": { + "us": 16737.3, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 7407.4, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 7407.4, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 7407.4, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 7432.6, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 7971.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 7971.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 30869.2, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 30869.2, + "level": "full" + }, + "variants": { + "generic": { + "us": 30869.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 12952.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 12952.9, + "level": "full" + }, + "variants": { + "parse": { + "us": 12952.9, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 22449.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 21666.8, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 21666.8, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 22449.4, + "level": "full" + }, + "Document": { + "us": 22480.2, + "level": "full" + }, + "Document (no encoding check)": { + "us": 22600.0, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 18301.0, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 18301.0, + "level": "full" + }, + "variants": { + "Value": { + "us": 18301.0, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 8007.1, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 8007.1, + "level": "full" + }, + "variants": { + "Value": { + "us": 8007.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "owned (copy)", + "us": 16360.2, + "level": "full" + }, + "best_any": { + "variant": "owned (copy)", + "us": 16360.2, + "level": "full" + }, + "variants": { + "owned (copy)": { + "us": 16360.2, + "level": "full" + }, + "borrowed (copy)": { + "us": 16446.2, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "editable", + "us": 208247.2, + "level": "full" + }, + "best_any": { + "variant": "editable", + "us": 208247.2, + "level": "full" + }, + "variants": { + "editable": { + "us": 208247.2, + "level": "full" + }, + "editable (source numbers)": { + "us": 211513.2, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 920570.5, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 920570.5, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 920570.5, + "level": "full" + }, + "parse": { + "us": 1233449.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + mut copy", + "us": 318770.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + mut copy", + "us": 318770.3, + "level": "full" + }, + "variants": { + "insitu (copy) + mut copy": { + "us": 318770.3, + "level": "full" + }, + "mut copy": { + "us": 355553.6, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 184491.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 184491.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 1095799.9, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 1095799.9, + "level": "full" + }, + "variants": { + "generic": { + "us": 1095799.9, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 346072.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 346072.6, + "level": "full" + }, + "variants": { + "parse": { + "us": 346072.6, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 378036.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 321177.0, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 321177.0, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 326538.7, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 378036.0, + "level": "full" + }, + "Document": { + "us": 409680.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 805289.9, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 805289.9, + "level": "full" + }, + "variants": { + "Value": { + "us": 805289.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 413714.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 413714.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 413714.2, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 416658.4, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 416658.4, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 416658.4, + "level": "full" + }, + "owned (copy)": { + "us": 701262.6, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "editable", + "us": 3.0, + "level": "full" + }, + "best_any": { + "variant": "editable", + "us": 3.0, + "level": "full" + }, + "variants": { + "editable": { + "us": 3.0, + "level": "full" + }, + "editable (source numbers)": { + "us": 3.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 14.7, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 14.7, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 14.7, + "level": "full" + }, + "parse": { + "us": 18.0, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 4.0, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 4.0, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 4.0, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 4.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3.2, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3.2, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 19.5, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 19.5, + "level": "full" + }, + "variants": { + "generic": { + "us": 19.5, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 8.5, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 8.5, + "level": "full" + }, + "variants": { + "parse": { + "us": 8.5, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 11.8, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 7.8, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 7.8, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 11.5, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 11.8, + "level": "full" + }, + "Document": { + "us": 15.1, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 21.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 21.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 21.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 6.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 6.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 6.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 9.0, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 9.0, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 9.0, + "level": "full" + }, + "owned (copy)": { + "us": 14.6, + "level": "full" + } + } + } + } + }, + "minify": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 472.3, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 472.3, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 463.6, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 472.3, + "level": "full" + }, + "parse + dump": { + "us": 474.4, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 4037.3, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 4037.3, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 4037.3, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + write", + "us": 625.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + write", + "us": 625.3, + "level": "full" + }, + "variants": { + "insitu (copy) + write": { + "us": 625.3, + "level": "full" + }, + "read + write": { + "us": 638.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 857.2, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 103.2, + "level": "partial" + }, + "variants": { + "minify": { + "us": 103.2, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 854.9, + "level": "full" + }, + "DOM + to_string": { + "us": 857.2, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 646.7, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 646.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 4215.1, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 418.5, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 418.5, + "level": "partial" + }, + "generic": { + "us": 4215.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 1758.4, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 1758.4, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 1758.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 2464.9, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (raw numbers) (no encoding check)", + "us": 1803.7, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 1803.7, + "level": "no UTF-8" + }, + "SAX to Writer (no encoding check)": { + "us": 1928.1, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 2181.3, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 2464.9, + "level": "full" + }, + "SAX to Writer (raw numbers)": { + "us": 2471.9, + "level": "full" + }, + "Document + Writer": { + "us": 2940.2, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 4081.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 4081.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 4081.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 987.7, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 987.7, + "level": "full" + }, + "variants": { + "Value": { + "us": 987.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 1924.3, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 1924.3, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 1924.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump", + "us": 992.8, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 992.8, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 988.6, + "level": "full" + }, + "parse + dump": { + "us": 992.8, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 993.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 6081.1, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 6081.1, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 6081.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 1256.0, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 1256.0, + "level": "full" + }, + "variants": { + "read + write": { + "us": 1256.0, + "level": "full" + }, + "insitu (copy) + write": { + "us": 1258.5, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 1543.1, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 256.3, + "level": "partial" + }, + "variants": { + "minify": { + "us": 256.3, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 1532.0, + "level": "full" + }, + "DOM + to_string": { + "us": 1543.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 1486.7, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 1486.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 7644.4, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 1061.9, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 1061.9, + "level": "partial" + }, + "generic": { + "us": 7644.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 2553.3, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 2553.3, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 2553.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 2829.0, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 2416.0, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 2416.0, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 2724.7, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 2829.0, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 2926.9, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 3153.1, + "level": "full" + }, + "Document + Writer": { + "us": 3413.1, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 6879.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 6879.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 6879.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2093.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 2093.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 2093.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 4375.1, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 4375.1, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 4375.1, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 2767.2, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 2767.2, + "level": "full" + }, + "variants": { + "parse + dump (source numbers)": { + "us": 2767.2, + "level": "full" + }, + "parse + dump": { + "us": 5444.7, + "level": "full" + }, + "read + dump (reused)": { + "us": 5475.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 16348.6, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 16348.6, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 16348.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 6260.9, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 6260.9, + "level": "full" + }, + "variants": { + "read + write": { + "us": 6260.9, + "level": "full" + }, + "insitu (copy) + write": { + "us": 6282.8, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 16516.3, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 372.7, + "level": "partial" + }, + "variants": { + "minify": { + "us": 372.7, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 16449.6, + "level": "full" + }, + "DOM + to_string": { + "us": 16516.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 7924.5, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 7924.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 29762.2, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 2150.4, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 2150.4, + "level": "partial" + }, + "generic": { + "us": 29762.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 12744.1, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 12744.1, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 12744.1, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer (raw numbers)", + "us": 14949.3, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (raw numbers) (no encoding check)", + "us": 14730.4, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 14730.4, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 14949.3, + "level": "full" + }, + "Document + Writer": { + "us": 22131.7, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 22582.9, + "level": "no UTF-8" + }, + "SAX to Writer (no encoding check)": { + "us": 23656.8, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 23802.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 17248.7, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 17248.7, + "level": "full" + }, + "variants": { + "Value": { + "us": 17248.7, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 7774.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 7774.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 7774.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 15278.3, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 15278.3, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 15278.3, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump", + "us": 153154.8, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 153154.8, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 118386.0, + "level": "full" + }, + "parse + dump": { + "us": 153154.8, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 155443.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 771911.6, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 771911.6, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 771911.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + write", + "us": 212042.8, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + write", + "us": 212042.8, + "level": "full" + }, + "variants": { + "insitu (copy) + write": { + "us": 212042.8, + "level": "full" + }, + "read + write": { + "us": 217458.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 326881.1, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 51242.9, + "level": "partial" + }, + "variants": { + "minify": { + "us": 51242.9, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 255382.7, + "level": "full" + }, + "DOM + to_string": { + "us": 326881.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 182939.5, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 182939.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 683744.4, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 93265.4, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 93265.4, + "level": "partial" + }, + "generic": { + "us": 683744.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 358018.4, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 358018.4, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 358018.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 374258.4, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 269636.8, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 269636.8, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 278648.6, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 338594.4, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 374258.4, + "level": "full" + }, + "SAX to Writer (raw numbers)": { + "us": 379957.3, + "level": "full" + }, + "Document + Writer": { + "us": 438464.5, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 615033.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 615033.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 615033.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 217697.4, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 217697.4, + "level": "full" + }, + "variants": { + "Value": { + "us": 217697.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 419473.7, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 419473.7, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 419473.7, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 2.4, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 2.3, + "level": "full" + }, + "parse + dump": { + "us": 2.4, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 2.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 17.0, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 17.0, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 17.0, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 3.1, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 3.1, + "level": "full" + }, + "variants": { + "read + write": { + "us": 3.1, + "level": "full" + }, + "insitu (copy) + write": { + "us": 3.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 5.1, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 0.5, + "level": "partial" + }, + "variants": { + "minify": { + "us": 0.5, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 4.7, + "level": "full" + }, + "DOM + to_string": { + "us": 5.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 3.2, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 3.2, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 18.7, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 2.0, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 2.0, + "level": "partial" + }, + "generic": { + "us": 18.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 9.0, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 9.0, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 9.0, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 13.2, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 9.5, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 9.5, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 9.6, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 11.7, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 13.2, + "level": "full" + }, + "SAX to Writer (raw numbers)": { + "us": 13.4, + "level": "full" + }, + "Document + Writer": { + "us": 15.2, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 18.4, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 18.4, + "level": "full" + }, + "variants": { + "Value": { + "us": 18.4, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 5.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 5.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 5.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 8.7, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 8.7, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 8.7, + "level": "full" + } + } + } + } + }, + "write": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "dump", + "us": 152.3, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 152.3, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 152.3, + "level": "n/a" + }, + "dump (source numbers)": { + "us": 153.9, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 445.2, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 445.2, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 445.2, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 219.4, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 219.4, + "level": "n/a" + }, + "variants": { + "write": { + "us": 219.4, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 551.4, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 551.4, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 551.4, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 644.4, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 644.4, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 644.4, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 231.2, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 231.2, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 231.2, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 413.4, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 413.4, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 413.4, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 489.2, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 489.2, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 489.2, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 562.8, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 562.8, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 562.8, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 442.3, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 442.3, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 442.3, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 604.4, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 604.4, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 604.4, + "level": "n/a" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "dump", + "us": 271.5, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 271.5, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 271.5, + "level": "n/a" + }, + "dump (source numbers)": { + "us": 273.0, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 590.0, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 590.0, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 590.0, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 363.9, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 363.9, + "level": "n/a" + }, + "variants": { + "write": { + "us": 363.9, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 802.6, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 802.6, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 802.6, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 966.5, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 966.5, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 966.5, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 475.4, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 475.4, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 475.4, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 725.0, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 725.0, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 725.0, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 902.0, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 902.0, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 902.0, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 882.5, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 882.5, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 882.5, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 934.6, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 934.6, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 934.6, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 809.4, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 809.4, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 809.4, + "level": "n/a" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 985.5, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 985.5, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 985.5, + "level": "n/a" + }, + "dump": { + "us": 3634.1, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 4523.3, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 4523.3, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 4523.3, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 3380.4, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 3380.4, + "level": "n/a" + }, + "variants": { + "write": { + "us": 3380.4, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 12976.8, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 12976.8, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 12976.8, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 9613.7, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 9613.7, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 9613.7, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 4851.0, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 4851.0, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 4851.0, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 4238.7, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 4238.7, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 4238.7, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 5658.9, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 5658.9, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 5658.9, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 3978.8, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 3978.8, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 3978.8, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 3954.2, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 3954.2, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 3954.2, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 4824.9, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 4824.9, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 4824.9, + "level": "n/a" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "dump", + "us": 68840.1, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 68840.1, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 68840.1, + "level": "n/a" + }, + "dump (source numbers)": { + "us": 69769.1, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 118445.9, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 118445.9, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 118445.9, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 75135.8, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 75135.8, + "level": "n/a" + }, + "variants": { + "write": { + "us": 75135.8, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 183836.8, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 183836.8, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 183836.8, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 127166.6, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 127166.6, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 127166.6, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 69344.4, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 69344.4, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 69344.4, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 137011.4, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 137011.4, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 137011.4, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 127822.6, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 127822.6, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 127822.6, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 120716.3, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 120716.3, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 120716.3, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 100888.7, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 100888.7, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 100888.7, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 110710.5, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 110710.5, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 110710.5, + "level": "n/a" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "dump", + "us": 0.9, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 0.9, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 0.9, + "level": "n/a" + }, + "dump (source numbers)": { + "us": 0.9, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 1.9, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 1.9, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 1.9, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 1.3, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 1.3, + "level": "n/a" + }, + "variants": { + "write": { + "us": 1.3, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 3.2, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 3.2, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 3.2, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 3.9, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 3.9, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 3.9, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 1.2, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 1.2, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 1.2, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 2.1, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 2.1, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 2.1, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 2.5, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 2.5, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 2.5, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 2.9, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 2.9, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 2.9, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2.6, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 2.6, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 2.6, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 2.7, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 2.7, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 2.7, + "level": "n/a" + } + } + } + } + } +} diff --git a/docs/mkdocs/scripts/figures/data/perf_usecases_x86-gcc.json b/docs/mkdocs/scripts/figures/data/perf_usecases_x86-gcc.json new file mode 100644 index 000000000..b9ace0b9a --- /dev/null +++ b/docs/mkdocs/scripts/figures/data/perf_usecases_x86-gcc.json @@ -0,0 +1,7224 @@ +{ + "validate": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 304.5, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 304.5, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 297.0, + "level": "full" + }, + "parse": { + "us": 304.5, + "level": "full" + }, + "accept": { + "us": 310.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 816.9, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 816.9, + "level": "full" + }, + "variants": { + "accept": { + "us": 816.9, + "level": "full" + }, + "parse": { + "us": 3679.7, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 393.6, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 393.6, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 393.6, + "level": "full" + }, + "read": { + "us": 396.5, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 301.9, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 301.9, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 297.4, + "level": "full" + }, + "DOM": { + "us": 301.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 404.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 404.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 727.4, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 727.4, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 727.4, + "level": "full" + }, + "generic": { + "us": 3066.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 680.1, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 680.1, + "level": "full" + }, + "variants": { + "SAX": { + "us": 680.1, + "level": "full" + }, + "parse": { + "us": 1345.5, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1250.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1098.2, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1098.2, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1250.0, + "level": "full" + }, + "SAX (no encoding check)": { + "us": 1266.5, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1392.6, + "level": "no UTF-8" + }, + "SAX": { + "us": 2004.8, + "level": "full" + }, + "Document": { + "us": 2113.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 633.5, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 486.9, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 486.9, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 633.5, + "level": "full" + }, + "Value": { + "us": 3815.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 469.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 469.6, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 469.6, + "level": "full" + }, + "Value": { + "us": 563.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 591.5, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 591.5, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 578.1, + "level": "full" + }, + "tape (copy)": { + "us": 591.5, + "level": "full" + }, + "borrowed (copy)": { + "us": 1281.8, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 732.7, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 732.7, + "level": "full" + }, + "variants": { + "parse": { + "us": 732.7, + "level": "full" + }, + "read (reused)": { + "us": 735.1, + "level": "full" + }, + "accept": { + "us": 742.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 1613.9, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 1613.9, + "level": "full" + }, + "variants": { + "accept": { + "us": 1613.9, + "level": "full" + }, + "parse": { + "us": 5868.0, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 955.5, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 955.5, + "level": "full" + }, + "variants": { + "read": { + "us": 955.5, + "level": "full" + }, + "insitu (copy)": { + "us": 962.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 705.3, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 705.3, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 699.9, + "level": "full" + }, + "DOM": { + "us": 705.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 934.8, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 934.8, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 1983.3, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 1983.3, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 1983.3, + "level": "full" + }, + "generic": { + "us": 5604.8, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 921.9, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 921.9, + "level": "full" + }, + "variants": { + "SAX": { + "us": 921.9, + "level": "full" + }, + "parse": { + "us": 1702.7, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1910.0, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 1607.1, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 1607.1, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1861.8, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 1887.3, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1910.0, + "level": "full" + }, + "SAX": { + "us": 2033.0, + "level": "full" + }, + "Document": { + "us": 2343.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 1447.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1370.5, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 1370.5, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 1447.6, + "level": "full" + }, + "Value": { + "us": 6238.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 965.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 965.6, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 965.6, + "level": "full" + }, + "Value": { + "us": 1189.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 1425.7, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 1425.7, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 1409.5, + "level": "full" + }, + "tape (copy)": { + "us": 1425.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 3637.0, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "accept", + "us": 1682.3, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 1682.3, + "level": "full" + }, + "variants": { + "accept": { + "us": 1682.3, + "level": "full" + }, + "read (reused)": { + "us": 1683.4, + "level": "full" + }, + "parse": { + "us": 1724.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 4402.5, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 4402.5, + "level": "full" + }, + "variants": { + "accept": { + "us": 4402.5, + "level": "full" + }, + "parse": { + "us": 11745.7, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 3322.1, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 3322.1, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 3322.1, + "level": "full" + }, + "read": { + "us": 3338.8, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 3175.8, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 3175.8, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 3170.7, + "level": "full" + }, + "DOM": { + "us": 3175.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3217.9, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3217.9, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 2570.7, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 2570.7, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 2570.7, + "level": "full" + }, + "generic": { + "us": 17783.3, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 5992.7, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 5992.7, + "level": "full" + }, + "variants": { + "SAX": { + "us": 5992.7, + "level": "full" + }, + "parse": { + "us": 6960.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 10180.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 10180.7, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 10180.7, + "level": "full" + }, + "SAX": { + "us": 10354.8, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 10657.4, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 10857.2, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 11812.2, + "level": "no UTF-8" + }, + "Document": { + "us": 11830.7, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 2401.7, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 2318.5, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 2318.5, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 2401.7, + "level": "full" + }, + "Value": { + "us": 13367.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 2249.4, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 2249.4, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 2249.4, + "level": "full" + }, + "Value": { + "us": 3754.2, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 4302.9, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 4302.9, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 4245.2, + "level": "full" + }, + "tape (copy)": { + "us": 4302.9, + "level": "full" + }, + "borrowed (copy)": { + "us": 10036.5, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 78594.0, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 78594.0, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 41399.3, + "level": "full" + }, + "parse": { + "us": 78594.0, + "level": "full" + }, + "accept": { + "us": 78892.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 92387.1, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 92387.1, + "level": "full" + }, + "variants": { + "accept": { + "us": 92387.1, + "level": "full" + }, + "parse": { + "us": 551872.7, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 130977.9, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 130977.9, + "level": "full" + }, + "variants": { + "read": { + "us": 130977.9, + "level": "full" + }, + "insitu (copy)": { + "us": 135164.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 114179.9, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 114179.9, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 47586.7, + "level": "full" + }, + "DOM": { + "us": 114179.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 95565.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 95565.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 76360.7, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 76360.7, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 76360.7, + "level": "full" + }, + "generic": { + "us": 366998.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 60686.7, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 60686.7, + "level": "full" + }, + "variants": { + "SAX": { + "us": 60686.7, + "level": "full" + }, + "parse": { + "us": 174955.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 150241.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 143546.5, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 143546.5, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 150241.4, + "level": "full" + }, + "SAX (no encoding check)": { + "us": 151210.9, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 177065.8, + "level": "no UTF-8" + }, + "SAX": { + "us": 247096.9, + "level": "full" + }, + "Document": { + "us": 256296.6, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 66822.2, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 59800.9, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 59800.9, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 66822.2, + "level": "full" + }, + "Value": { + "us": 490960.4, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 54246.3, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 54246.3, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 54246.3, + "level": "full" + }, + "Value": { + "us": 117743.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 211715.5, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 211715.5, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 135460.9, + "level": "full" + }, + "tape (copy)": { + "us": 211715.5, + "level": "full" + }, + "borrowed (copy)": { + "us": 289558.6, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "accept", + "us": 1.5, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 1.5, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1.4, + "level": "full" + }, + "accept": { + "us": 1.5, + "level": "full" + }, + "parse": { + "us": 1.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 4.1, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 4.1, + "level": "full" + }, + "variants": { + "accept": { + "us": 4.1, + "level": "full" + }, + "parse": { + "us": 14.8, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1.6, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1.6, + "level": "full" + }, + "variants": { + "read": { + "us": 1.6, + "level": "full" + }, + "insitu (copy)": { + "us": 1.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 1.8, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 1.8, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 1.4, + "level": "full" + }, + "DOM": { + "us": 1.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1.7, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 2.6, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 2.6, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 2.6, + "level": "full" + }, + "generic": { + "us": 13.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 2.6, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 2.6, + "level": "full" + }, + "variants": { + "SAX": { + "us": 2.6, + "level": "full" + }, + "parse": { + "us": 6.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 5.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 3.6, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 3.6, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 5.3, + "level": "full" + }, + "SAX (no encoding check)": { + "us": 6.6, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 7.4, + "level": "no UTF-8" + }, + "SAX": { + "us": 10.8, + "level": "full" + }, + "Document": { + "us": 11.9, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1.9, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 1.9, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 2.4, + "level": "full" + }, + "Value": { + "us": 12.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 1.8, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1.8, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 1.8, + "level": "full" + }, + "Value": { + "us": 2.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 2.8, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 2.8, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 2.4, + "level": "full" + }, + "tape (copy)": { + "us": 2.8, + "level": "full" + }, + "borrowed (copy)": { + "us": 5.3, + "level": "full" + } + } + } + } + }, + "sum": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 383.0, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 383.0, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 367.4, + "level": "full" + }, + "parse": { + "us": 383.0, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 789.6, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 789.6, + "level": "full" + }, + "variants": { + "sax": { + "us": 789.6, + "level": "full" + }, + "parse": { + "us": 3780.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 448.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 448.0, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 448.0, + "level": "full" + }, + "read": { + "us": 451.5, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 347.1, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 347.1, + "level": "full" + }, + "variants": { + "On-Demand (reused)": { + "us": 343.9, + "level": "full" + }, + "On-Demand": { + "us": 347.1, + "level": "full" + }, + "DOM (reused)": { + "us": 374.3, + "level": "full" + }, + "DOM": { + "us": 381.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 462.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 462.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 2940.2, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 2940.2, + "level": "full" + }, + "variants": { + "generic": { + "us": 2940.2, + "level": "full" + }, + "lazy_json": { + "us": 3214.9, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 668.0, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 668.0, + "level": "full" + }, + "variants": { + "SAX": { + "us": 668.0, + "level": "full" + }, + "parse": { + "us": 1348.6, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1296.1, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1145.2, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1145.2, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 1277.4, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1296.1, + "level": "full" + }, + "Document (no encoding check)": { + "us": 1442.8, + "level": "no UTF-8" + }, + "SAX": { + "us": 2055.5, + "level": "full" + }, + "Document": { + "us": 2144.7, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 1318.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 1318.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 1318.2, + "level": "full" + }, + "Value": { + "us": 4058.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 494.3, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 494.3, + "level": "full" + }, + "variants": { + "visitor": { + "us": 494.3, + "level": "full" + }, + "Value": { + "us": 808.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 722.1, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 722.1, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 722.1, + "level": "full" + }, + "borrowed (reused)": { + "us": 1451.8, + "level": "full" + }, + "borrowed (copy)": { + "us": 1475.4, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 932.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 932.3, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 927.1, + "level": "full" + }, + "parse": { + "us": 932.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 1623.8, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 1623.8, + "level": "full" + }, + "variants": { + "sax": { + "us": 1623.8, + "level": "full" + }, + "parse": { + "us": 5901.3, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 1093.8, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 1093.8, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 1093.8, + "level": "full" + }, + "read": { + "us": 1098.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 795.5, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 795.5, + "level": "full" + }, + "variants": { + "On-Demand": { + "us": 795.5, + "level": "full" + }, + "On-Demand (reused)": { + "us": 795.6, + "level": "full" + }, + "DOM (reused)": { + "us": 920.9, + "level": "full" + }, + "DOM": { + "us": 925.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1124.9, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1124.9, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 5527.5, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 5527.5, + "level": "full" + }, + "variants": { + "generic": { + "us": 5527.5, + "level": "full" + }, + "lazy_json": { + "us": 13584.6, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 934.2, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 934.2, + "level": "full" + }, + "variants": { + "SAX": { + "us": 934.2, + "level": "full" + }, + "parse": { + "us": 1810.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 2010.7, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 1688.4, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 1688.4, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 2010.7, + "level": "full" + }, + "Document (no encoding check)": { + "us": 2011.4, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 2029.9, + "level": "no UTF-8" + }, + "SAX": { + "us": 2127.4, + "level": "full" + }, + "Document": { + "us": 2429.5, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 2298.7, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 2298.7, + "level": "full" + }, + "variants": { + "visitor": { + "us": 2298.7, + "level": "full" + }, + "Value": { + "us": 6416.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 1134.9, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 1134.9, + "level": "full" + }, + "variants": { + "visitor": { + "us": 1134.9, + "level": "full" + }, + "Value": { + "us": 1798.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 1685.7, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 1685.7, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 1685.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 3825.0, + "level": "full" + }, + "borrowed (reused)": { + "us": 3865.2, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 3873.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 3873.9, + "level": "full" + }, + "variants": { + "parse": { + "us": 3873.9, + "level": "full" + }, + "read (reused)": { + "us": 3874.2, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 5671.4, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 5671.4, + "level": "full" + }, + "variants": { + "sax": { + "us": 5671.4, + "level": "full" + }, + "parse": { + "us": 12119.7, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 3955.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 3955.4, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 3955.4, + "level": "full" + }, + "read": { + "us": 3965.4, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 3475.8, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 3475.8, + "level": "full" + }, + "variants": { + "On-Demand (reused)": { + "us": 3471.4, + "level": "full" + }, + "On-Demand": { + "us": 3475.8, + "level": "full" + }, + "DOM (reused)": { + "us": 3988.1, + "level": "full" + }, + "DOM": { + "us": 3998.6, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3866.7, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3866.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 17829.8, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 17829.8, + "level": "full" + }, + "variants": { + "generic": { + "us": 17829.8, + "level": "full" + }, + "lazy_json": { + "us": 19443.4, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 5691.5, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 5691.5, + "level": "full" + }, + "variants": { + "SAX": { + "us": 5691.5, + "level": "full" + }, + "parse": { + "us": 7404.5, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 10600.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 10600.7, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 10600.7, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 10782.8, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 11125.4, + "level": "no UTF-8" + }, + "SAX": { + "us": 11233.5, + "level": "full" + }, + "Document": { + "us": 12111.8, + "level": "full" + }, + "Document (no encoding check)": { + "us": 12165.1, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 7610.4, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 7610.4, + "level": "full" + }, + "variants": { + "visitor": { + "us": 7610.4, + "level": "full" + }, + "Value": { + "us": 14578.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 4580.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 4580.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 4580.2, + "level": "full" + }, + "Value": { + "us": 7489.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 5190.9, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 5190.9, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 5190.9, + "level": "full" + }, + "borrowed (reused)": { + "us": 11384.6, + "level": "full" + }, + "borrowed (copy)": { + "us": 11483.9, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 93197.1, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 93197.1, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 55280.7, + "level": "full" + }, + "parse": { + "us": 93197.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 93963.8, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 93963.8, + "level": "full" + }, + "variants": { + "sax": { + "us": 93963.8, + "level": "full" + }, + "parse": { + "us": 622544.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 136684.2, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 136684.2, + "level": "full" + }, + "variants": { + "read": { + "us": 136684.2, + "level": "full" + }, + "insitu (copy)": { + "us": 140100.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 92000.4, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 92000.4, + "level": "full" + }, + "variants": { + "On-Demand (reused)": { + "us": 51134.3, + "level": "full" + }, + "DOM (reused)": { + "us": 59327.1, + "level": "full" + }, + "On-Demand": { + "us": 92000.4, + "level": "full" + }, + "DOM": { + "us": 131068.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 106727.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 106727.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 390814.5, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 255217.2, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 255217.2, + "level": "partial" + }, + "generic": { + "us": 390814.5, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 62485.6, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 62485.6, + "level": "full" + }, + "variants": { + "SAX": { + "us": 62485.6, + "level": "full" + }, + "parse": { + "us": 196607.9, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 170083.4, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 157808.9, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 157808.9, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 162172.8, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 170083.4, + "level": "full" + }, + "Document (no encoding check)": { + "us": 187689.1, + "level": "no UTF-8" + }, + "SAX": { + "us": 246046.5, + "level": "full" + }, + "Document": { + "us": 274825.9, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 123810.1, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 123810.1, + "level": "full" + }, + "variants": { + "visitor": { + "us": 123810.1, + "level": "full" + }, + "Value": { + "us": 526223.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 59149.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 59149.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 59149.2, + "level": "full" + }, + "Value": { + "us": 150764.0, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 220581.9, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 220581.9, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 220581.9, + "level": "full" + }, + "borrowed (reused)": { + "us": 228425.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 293609.3, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 2.0, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1.8, + "level": "full" + }, + "parse": { + "us": 2.0, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 3.9, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 3.9, + "level": "full" + }, + "variants": { + "sax": { + "us": 3.9, + "level": "full" + }, + "parse": { + "us": 14.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1.9, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1.9, + "level": "full" + }, + "variants": { + "read": { + "us": 1.9, + "level": "full" + }, + "insitu (copy)": { + "us": 1.9, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 1.9, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 1.9, + "level": "full" + }, + "variants": { + "On-Demand (reused)": { + "us": 1.6, + "level": "full" + }, + "DOM (reused)": { + "us": 1.8, + "level": "full" + }, + "On-Demand": { + "us": 1.9, + "level": "full" + }, + "DOM": { + "us": 2.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 2.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 2.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 12.6, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 6.3, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 6.3, + "level": "partial" + }, + "generic": { + "us": 12.6, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 2.7, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 2.7, + "level": "full" + }, + "variants": { + "SAX": { + "us": 2.7, + "level": "full" + }, + "parse": { + "us": 6.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 5.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 3.9, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 3.9, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 5.3, + "level": "full" + }, + "SAX (no encoding check)": { + "us": 6.4, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 7.5, + "level": "no UTF-8" + }, + "SAX": { + "us": 10.5, + "level": "full" + }, + "Document": { + "us": 11.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 4.3, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 4.3, + "level": "full" + }, + "variants": { + "visitor": { + "us": 4.3, + "level": "full" + }, + "Value": { + "us": 12.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 2.4, + "level": "full" + }, + "variants": { + "visitor": { + "us": 2.4, + "level": "full" + }, + "Value": { + "us": 4.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 3.8, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 3.8, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 3.8, + "level": "full" + }, + "borrowed (reused)": { + "us": 5.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 6.3, + "level": "full" + } + } + } + } + }, + "select": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "structs (from_json)", + "us": 325.2, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 325.2, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 310.7, + "level": "full" + }, + "structs (from_json)": { + "us": 325.2, + "level": "full" + }, + "parse": { + "us": 330.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 3642.8, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 3642.8, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 3642.8, + "level": "full" + }, + "parse": { + "us": 3807.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 403.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 403.3, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 403.3, + "level": "full" + }, + "read": { + "us": 408.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 315.1, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 201.8, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 197.8, + "level": "partial" + }, + "On-Demand": { + "us": 201.8, + "level": "partial" + }, + "DOM (reused)": { + "us": 307.8, + "level": "full" + }, + "DOM": { + "us": 315.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 409.9, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 409.9, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 618.7, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 359.6, + "level": "partial" + }, + "variants": { + "structs": { + "us": 359.6, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 618.7, + "level": "full" + }, + "lazy_json": { + "us": 997.4, + "level": "partial" + }, + "generic": { + "us": 3115.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1326.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1326.3, + "level": "full" + }, + "variants": { + "parse": { + "us": 1326.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1274.5, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1098.0, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1098.0, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1274.5, + "level": "full" + }, + "Document (no encoding check)": { + "us": 1465.7, + "level": "no UTF-8" + }, + "Document": { + "us": 2220.6, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 769.2, + "level": "full" + }, + "best_any": { + "variant": "from_utf8 + structs", + "us": 769.2, + "level": "full" + }, + "variants": { + "from_utf8 + structs": { + "us": 769.2, + "level": "full" + }, + "structs": { + "us": 812.9, + "level": "no UTF-8" + }, + "Value": { + "us": 4230.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 556.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 556.9, + "level": "full" + }, + "variants": { + "structs": { + "us": 556.9, + "level": "full" + }, + "Value": { + "us": 632.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 729.9, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 729.9, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 729.9, + "level": "full" + }, + "borrowed (copy)": { + "us": 1364.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "structs (from_json)", + "us": 784.3, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 784.3, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 784.3, + "level": "full" + }, + "parse": { + "us": 784.8, + "level": "full" + }, + "read (reused)": { + "us": 845.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 6198.8, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 6198.8, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 6198.8, + "level": "full" + }, + "parse": { + "us": 6278.3, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 1011.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 1011.4, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 1011.4, + "level": "full" + }, + "read": { + "us": 1020.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 754.5, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 641.5, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 631.1, + "level": "partial" + }, + "On-Demand": { + "us": 641.5, + "level": "partial" + }, + "DOM (reused)": { + "us": 728.9, + "level": "full" + }, + "DOM": { + "us": 754.5, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 951.8, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 951.8, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 2237.7, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 412.2, + "level": "partial" + }, + "variants": { + "structs": { + "us": 412.2, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 2237.7, + "level": "full" + }, + "generic": { + "us": 5961.1, + "level": "full" + }, + "lazy_json": { + "us": 8936.7, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1871.0, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1871.0, + "level": "full" + }, + "variants": { + "parse": { + "us": 1871.0, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 2060.1, + "level": "full" + }, + "best_any": { + "variant": "Document (no encoding check)", + "us": 2034.4, + "level": "no UTF-8" + }, + "variants": { + "Document (no encoding check)": { + "us": 2034.4, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 2044.4, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 2060.1, + "level": "full" + }, + "Document": { + "us": 2513.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 1503.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1472.7, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 1472.7, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 1503.9, + "level": "full" + }, + "Value": { + "us": 6038.8, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 1022.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1022.9, + "level": "full" + }, + "variants": { + "structs": { + "us": 1022.9, + "level": "full" + }, + "Value": { + "us": 1200.9, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 1658.4, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 1658.4, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 1658.4, + "level": "full" + }, + "borrowed (copy)": { + "us": 3571.2, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1686.4, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1686.4, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1678.8, + "level": "full" + }, + "parse": { + "us": 1686.4, + "level": "full" + }, + "structs (from_json)": { + "us": 1689.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 11694.1, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 11694.1, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 11694.1, + "level": "full" + }, + "parse": { + "us": 11803.9, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 3267.9, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 3267.9, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 3267.9, + "level": "full" + }, + "read": { + "us": 3280.0, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 3190.0, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 906.6, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 896.9, + "level": "partial" + }, + "On-Demand": { + "us": 906.6, + "level": "partial" + }, + "DOM (reused)": { + "us": 3178.2, + "level": "full" + }, + "DOM": { + "us": 3190.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3249.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3249.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 2543.5, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 433.0, + "level": "partial" + }, + "variants": { + "structs": { + "us": 433.0, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 2543.5, + "level": "full" + }, + "lazy_json": { + "us": 3465.4, + "level": "partial" + }, + "generic": { + "us": 17810.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 6891.7, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 6891.7, + "level": "full" + }, + "variants": { + "parse": { + "us": 6891.7, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 10431.6, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 10431.6, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 10431.6, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 10724.9, + "level": "no UTF-8" + }, + "Document": { + "us": 11757.4, + "level": "full" + }, + "Document (no encoding check)": { + "us": 12107.1, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 2442.0, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 2322.9, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 2322.9, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 2442.0, + "level": "full" + }, + "Value": { + "us": 13892.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 2246.6, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 2246.6, + "level": "full" + }, + "variants": { + "structs": { + "us": 2246.6, + "level": "full" + }, + "Value": { + "us": 3718.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 4915.3, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 4915.3, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 4915.3, + "level": "full" + }, + "borrowed (copy)": { + "us": 10315.4, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 91621.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 91621.8, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 54486.1, + "level": "full" + }, + "parse": { + "us": 91621.8, + "level": "full" + }, + "structs (from_json)": { + "us": 110708.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse", + "us": 605646.4, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 605646.4, + "level": "full" + }, + "variants": { + "parse": { + "us": 605646.4, + "level": "full" + }, + "structs (from_json)": { + "us": 618827.0, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 139622.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 139622.7, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 139622.7, + "level": "full" + }, + "read": { + "us": 141927.9, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 129838.2, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 50352.2, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 29858.7, + "level": "partial" + }, + "On-Demand": { + "us": 50352.2, + "level": "partial" + }, + "DOM (reused)": { + "us": 60080.8, + "level": "full" + }, + "DOM": { + "us": 129838.2, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 106865.5, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 106865.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 96608.5, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 74849.3, + "level": "partial" + }, + "variants": { + "structs": { + "us": 74849.3, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 96608.5, + "level": "full" + }, + "lazy_json": { + "us": 132104.8, + "level": "partial" + }, + "generic": { + "us": 411698.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 196136.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 196136.3, + "level": "full" + }, + "variants": { + "parse": { + "us": 196136.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 165343.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 156011.6, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 156011.6, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 165343.2, + "level": "full" + }, + "Document (no encoding check)": { + "us": 181269.4, + "level": "no UTF-8" + }, + "Document": { + "us": 269530.7, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 108385.8, + "level": "full" + }, + "best_any": { + "variant": "from_utf8 + structs", + "us": 108385.8, + "level": "full" + }, + "variants": { + "from_utf8 + structs": { + "us": 108385.8, + "level": "full" + }, + "structs": { + "us": 138827.1, + "level": "no UTF-8" + }, + "Value": { + "us": 560794.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 91995.7, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 91995.7, + "level": "full" + }, + "variants": { + "structs": { + "us": 91995.7, + "level": "full" + }, + "Value": { + "us": 145370.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 266072.7, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 266072.7, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 266072.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 328257.2, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1.6, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1.5, + "level": "full" + }, + "parse": { + "us": 1.6, + "level": "full" + }, + "structs (from_json)": { + "us": 1.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse", + "us": 14.5, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 14.5, + "level": "full" + }, + "variants": { + "parse": { + "us": 14.5, + "level": "full" + }, + "structs (from_json)": { + "us": 14.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 1.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 1.7, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 1.7, + "level": "full" + }, + "read": { + "us": 1.8, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 1.9, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 1.3, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 1.0, + "level": "partial" + }, + "On-Demand": { + "us": 1.3, + "level": "partial" + }, + "DOM (reused)": { + "us": 1.6, + "level": "full" + }, + "DOM": { + "us": 1.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1.8, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1.8, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 2.1, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1.5, + "level": "partial" + }, + "variants": { + "structs": { + "us": 1.5, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 2.1, + "level": "full" + }, + "lazy_json": { + "us": 2.4, + "level": "partial" + }, + "generic": { + "us": 13.6, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 6.1, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 6.1, + "level": "full" + }, + "variants": { + "parse": { + "us": 6.1, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 5.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 3.7, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 3.7, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 5.2, + "level": "full" + }, + "Document (no encoding check)": { + "us": 7.4, + "level": "no UTF-8" + }, + "Document": { + "us": 11.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 3.1, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 3.0, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 3.0, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 3.1, + "level": "full" + }, + "Value": { + "us": 14.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 2.0, + "level": "full" + }, + "variants": { + "structs": { + "us": 2.0, + "level": "full" + }, + "Value": { + "us": 2.8, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 3.6, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 3.6, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 3.6, + "level": "full" + }, + "borrowed (copy)": { + "us": 5.4, + "level": "full" + } + } + } + } + }, + "edit": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 531.3, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 531.3, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 531.3, + "level": "full" + }, + "editable": { + "us": 551.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 3046.2, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 3046.2, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 3046.2, + "level": "full" + }, + "parse": { + "us": 4465.9, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + mut copy", + "us": 801.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + mut copy", + "us": 801.0, + "level": "full" + }, + "variants": { + "insitu (copy) + mut copy": { + "us": 801.0, + "level": "full" + }, + "mut copy": { + "us": 810.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 628.7, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 628.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 3547.1, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 3547.1, + "level": "full" + }, + "variants": { + "generic": { + "us": 3547.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1770.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1770.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 1770.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1983.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1799.3, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1799.3, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1980.9, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1983.2, + "level": "full" + }, + "Document": { + "us": 2788.5, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 4474.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 4474.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 4474.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 1188.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 1188.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 1188.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 2071.4, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 2071.4, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 2071.4, + "level": "full" + }, + "owned (copy)": { + "us": 2880.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 1081.5, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 1081.5, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 1081.5, + "level": "full" + }, + "editable": { + "us": 1081.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 5086.9, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 5086.9, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 5086.9, + "level": "full" + }, + "parse": { + "us": 6376.5, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 1640.9, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 1640.9, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 1640.9, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 1644.6, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1454.9, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1454.9, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 6079.8, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 6079.8, + "level": "full" + }, + "variants": { + "generic": { + "us": 6079.8, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 2496.5, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 2496.5, + "level": "full" + }, + "variants": { + "parse": { + "us": 2496.5, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 2858.8, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 2858.8, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 2858.8, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 2873.5, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 2887.2, + "level": "no UTF-8" + }, + "Document": { + "us": 3181.2, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 6922.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 6922.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 6922.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2383.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 2383.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 2383.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 4465.1, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 4465.1, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 4465.1, + "level": "full" + }, + "owned (copy)": { + "us": 5204.4, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 2546.0, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 2546.0, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 2546.0, + "level": "full" + }, + "editable": { + "us": 5800.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 15464.1, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 15464.1, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 15464.1, + "level": "full" + }, + "parse": { + "us": 15816.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 7402.3, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 7402.3, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 7402.3, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 7588.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 8594.2, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 8594.2, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 22146.4, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 22146.4, + "level": "full" + }, + "variants": { + "generic": { + "us": 22146.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 12503.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 12503.9, + "level": "full" + }, + "variants": { + "parse": { + "us": 12503.9, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 19769.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 19394.3, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 19394.3, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 19769.3, + "level": "full" + }, + "Document (no encoding check)": { + "us": 21121.9, + "level": "no UTF-8" + }, + "Document": { + "us": 21351.1, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 18301.0, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 18301.0, + "level": "full" + }, + "variants": { + "Value": { + "us": 18301.0, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 8007.1, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 8007.1, + "level": "full" + }, + "variants": { + "Value": { + "us": 8007.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "owned (copy)", + "us": 16360.2, + "level": "full" + }, + "best_any": { + "variant": "owned (copy)", + "us": 16360.2, + "level": "full" + }, + "variants": { + "owned (copy)": { + "us": 16360.2, + "level": "full" + }, + "borrowed (copy)": { + "us": 16446.2, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 197693.5, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 197693.5, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 197693.5, + "level": "full" + }, + "editable": { + "us": 198866.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 863465.4, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 863465.4, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 863465.4, + "level": "full" + }, + "parse": { + "us": 1225477.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + mut copy", + "us": 313181.5, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + mut copy", + "us": 313181.5, + "level": "full" + }, + "variants": { + "insitu (copy) + mut copy": { + "us": 313181.5, + "level": "full" + }, + "mut copy": { + "us": 336588.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 185870.5, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 185870.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 937712.0, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 937712.0, + "level": "full" + }, + "variants": { + "generic": { + "us": 937712.0, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 311015.4, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 311015.4, + "level": "full" + }, + "variants": { + "parse": { + "us": 311015.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 298015.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 286230.6, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 286230.6, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 298015.0, + "level": "full" + }, + "Document (no encoding check)": { + "us": 314163.2, + "level": "no UTF-8" + }, + "Document": { + "us": 402509.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 805289.9, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 805289.9, + "level": "full" + }, + "variants": { + "Value": { + "us": 805289.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 413714.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 413714.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 413714.2, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 416658.4, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 416658.4, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 416658.4, + "level": "full" + }, + "owned (copy)": { + "us": 701262.6, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "editable", + "us": 3.1, + "level": "full" + }, + "best_any": { + "variant": "editable", + "us": 3.1, + "level": "full" + }, + "variants": { + "editable": { + "us": 3.1, + "level": "full" + }, + "editable (source numbers)": { + "us": 3.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 13.8, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 13.8, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 13.8, + "level": "full" + }, + "parse": { + "us": 17.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + mut copy", + "us": 3.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + mut copy", + "us": 3.7, + "level": "full" + }, + "variants": { + "insitu (copy) + mut copy": { + "us": 3.7, + "level": "full" + }, + "mut copy": { + "us": 3.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3.5, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 15.6, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 15.6, + "level": "full" + }, + "variants": { + "generic": { + "us": 15.6, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 8.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 8.6, + "level": "full" + }, + "variants": { + "parse": { + "us": 8.6, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 9.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 7.5, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 7.5, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 9.0, + "level": "full" + }, + "Document (no encoding check)": { + "us": 11.1, + "level": "no UTF-8" + }, + "Document": { + "us": 15.5, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 21.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 21.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 21.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 6.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 6.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 6.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 9.0, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 9.0, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 9.0, + "level": "full" + }, + "owned (copy)": { + "us": 14.6, + "level": "full" + } + } + } + } + }, + "minify": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 456.7, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 456.7, + "level": "full" + }, + "variants": { + "parse + dump (source numbers)": { + "us": 456.7, + "level": "full" + }, + "read + dump (reused)": { + "us": 468.2, + "level": "full" + }, + "parse + dump": { + "us": 482.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 4167.8, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 4167.8, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 4167.8, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 658.0, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 658.0, + "level": "full" + }, + "variants": { + "read + write": { + "us": 658.0, + "level": "full" + }, + "insitu (copy) + write": { + "us": 659.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 799.1, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 104.4, + "level": "partial" + }, + "variants": { + "minify": { + "us": 104.4, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 798.8, + "level": "full" + }, + "DOM + to_string": { + "us": 799.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 632.8, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 632.8, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 3393.7, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 419.2, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 419.2, + "level": "partial" + }, + "generic": { + "us": 3393.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 1803.1, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 1803.1, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 1803.1, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer (raw numbers)", + "us": 2559.6, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 1820.0, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 1820.0, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 1866.5, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 2096.1, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 2559.6, + "level": "full" + }, + "SAX to Writer": { + "us": 2606.5, + "level": "full" + }, + "Document + Writer": { + "us": 2866.1, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 4081.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 4081.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 4081.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 987.7, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 987.7, + "level": "full" + }, + "variants": { + "Value": { + "us": 987.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 1924.3, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 1924.3, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 1924.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 979.5, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 979.5, + "level": "full" + }, + "variants": { + "parse + dump (source numbers)": { + "us": 979.5, + "level": "full" + }, + "read + dump (reused)": { + "us": 996.2, + "level": "full" + }, + "parse + dump": { + "us": 1001.0, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 6252.7, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 6252.7, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 6252.7, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + write", + "us": 1268.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + write", + "us": 1268.4, + "level": "full" + }, + "variants": { + "insitu (copy) + write": { + "us": 1268.4, + "level": "full" + }, + "read + write": { + "us": 1269.2, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 1460.9, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 246.2, + "level": "partial" + }, + "variants": { + "minify": { + "us": 246.2, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 1428.7, + "level": "full" + }, + "DOM + to_string": { + "us": 1460.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 1436.3, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 1436.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 6016.3, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 1300.8, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 1300.8, + "level": "partial" + }, + "generic": { + "us": 6016.3, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 2480.2, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 2480.2, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 2480.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 2810.5, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 2456.2, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 2456.2, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 2675.5, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 2810.5, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 2810.7, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 3152.2, + "level": "full" + }, + "Document + Writer": { + "us": 3214.9, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 6879.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 6879.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 6879.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2093.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 2093.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 2093.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 4375.1, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 4375.1, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 4375.1, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 2569.0, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 2569.0, + "level": "full" + }, + "variants": { + "parse + dump (source numbers)": { + "us": 2569.0, + "level": "full" + }, + "parse + dump": { + "us": 5856.1, + "level": "full" + }, + "read + dump (reused)": { + "us": 5942.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 16655.9, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 16655.9, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 16655.9, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + write", + "us": 6934.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + write", + "us": 6934.0, + "level": "full" + }, + "variants": { + "insitu (copy) + write": { + "us": 6934.0, + "level": "full" + }, + "read + write": { + "us": 7267.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 15172.6, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 364.6, + "level": "partial" + }, + "variants": { + "minify": { + "us": 364.6, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 14978.9, + "level": "full" + }, + "DOM + to_string": { + "us": 15172.6, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 8992.1, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 8992.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 23222.8, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 2832.4, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 2832.4, + "level": "partial" + }, + "generic": { + "us": 23222.8, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 13545.3, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 13545.3, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 13545.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer (raw numbers)", + "us": 15169.9, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (raw numbers) (no encoding check)", + "us": 15167.0, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 15167.0, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 15169.9, + "level": "full" + }, + "SAX to Writer (no encoding check)": { + "us": 21770.0, + "level": "no UTF-8" + }, + "Document + Writer": { + "us": 22159.5, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 22784.5, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 23328.6, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 17248.7, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 17248.7, + "level": "full" + }, + "variants": { + "Value": { + "us": 17248.7, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 7774.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 7774.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 7774.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 15278.3, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 15278.3, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 15278.3, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 157051.6, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 157051.6, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 118671.3, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 157051.6, + "level": "full" + }, + "parse + dump": { + "us": 159532.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 777124.8, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 777124.8, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 777124.8, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + write", + "us": 210677.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + write", + "us": 210677.3, + "level": "full" + }, + "variants": { + "insitu (copy) + write": { + "us": 210677.3, + "level": "full" + }, + "read + write": { + "us": 210865.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 310524.3, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 47396.7, + "level": "partial" + }, + "variants": { + "minify": { + "us": 47396.7, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 231143.4, + "level": "full" + }, + "DOM + to_string": { + "us": 310524.3, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 178112.8, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 178112.8, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 512061.4, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 92189.7, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 92189.7, + "level": "partial" + }, + "generic": { + "us": 512061.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 324720.8, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 324720.8, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 324720.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer (raw numbers)", + "us": 355670.8, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 277281.0, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 277281.0, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 277975.6, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 307801.0, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 355670.8, + "level": "full" + }, + "SAX to Writer": { + "us": 360474.5, + "level": "full" + }, + "Document + Writer": { + "us": 390895.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 615033.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 615033.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 615033.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 217697.4, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 217697.4, + "level": "full" + }, + "variants": { + "Value": { + "us": 217697.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 419473.7, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 419473.7, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 419473.7, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 2.4, + "level": "full" + }, + "variants": { + "parse + dump (source numbers)": { + "us": 2.4, + "level": "full" + }, + "read + dump (reused)": { + "us": 2.4, + "level": "full" + }, + "parse + dump": { + "us": 2.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 16.4, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 16.4, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 16.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 2.9, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 2.9, + "level": "full" + }, + "variants": { + "read + write": { + "us": 2.9, + "level": "full" + }, + "insitu (copy) + write": { + "us": 2.9, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 4.7, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 0.5, + "level": "partial" + }, + "variants": { + "minify": { + "us": 0.5, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 4.4, + "level": "full" + }, + "DOM + to_string": { + "us": 4.7, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 3.3, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 3.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 15.1, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 1.9, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 1.9, + "level": "partial" + }, + "generic": { + "us": 15.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 8.7, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 8.7, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 8.7, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 13.6, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 9.4, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 9.4, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 10.1, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 11.0, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 13.6, + "level": "full" + }, + "SAX to Writer (raw numbers)": { + "us": 13.6, + "level": "full" + }, + "Document + Writer": { + "us": 15.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 18.4, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 18.4, + "level": "full" + }, + "variants": { + "Value": { + "us": 18.4, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 5.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 5.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 5.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 8.7, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 8.7, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 8.7, + "level": "full" + } + } + } + } + }, + "write": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 138.0, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 138.0, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 138.0, + "level": "n/a" + }, + "dump": { + "us": 155.2, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 433.3, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 433.3, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 433.3, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 189.7, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 189.7, + "level": "n/a" + }, + "variants": { + "write": { + "us": 189.7, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 471.2, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 471.2, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 471.2, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 653.4, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 653.4, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 653.4, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 259.1, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 259.1, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 259.1, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 366.7, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 366.7, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 366.7, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 454.2, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 454.2, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 454.2, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 562.8, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 562.8, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 562.8, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 442.3, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 442.3, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 442.3, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 604.4, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 604.4, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 604.4, + "level": "n/a" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 228.6, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 228.6, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 228.6, + "level": "n/a" + }, + "dump": { + "us": 253.4, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 606.7, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 606.7, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 606.7, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 320.5, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 320.5, + "level": "n/a" + }, + "variants": { + "write": { + "us": 320.5, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 711.7, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 711.7, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 711.7, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 977.6, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 977.6, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 977.6, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 510.0, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 510.0, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 510.0, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 688.5, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 688.5, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 688.5, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 835.0, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 835.0, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 835.0, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 882.5, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 882.5, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 882.5, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 934.6, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 934.6, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 934.6, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 809.4, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 809.4, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 809.4, + "level": "n/a" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 833.8, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 833.8, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 833.8, + "level": "n/a" + }, + "dump": { + "us": 3899.3, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 3896.5, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 3896.5, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 3896.5, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 3348.8, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 3348.8, + "level": "n/a" + }, + "variants": { + "write": { + "us": 3348.8, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 11156.4, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 11156.4, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 11156.4, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 9071.2, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 9071.2, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 9071.2, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 5268.6, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 5268.6, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 5268.6, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 4096.9, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 4096.9, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 4096.9, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 5468.2, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 5468.2, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 5468.2, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 3978.8, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 3978.8, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 3978.8, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 3954.2, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 3954.2, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 3954.2, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 4824.9, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 4824.9, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 4824.9, + "level": "n/a" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "dump", + "us": 69593.3, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 69593.3, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 69593.3, + "level": "n/a" + }, + "dump (source numbers)": { + "us": 70109.3, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 126529.1, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 126529.1, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 126529.1, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 69581.7, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 69581.7, + "level": "n/a" + }, + "variants": { + "write": { + "us": 69581.7, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 186861.4, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 186861.4, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 186861.4, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 138831.7, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 138831.7, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 138831.7, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 76583.6, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 76583.6, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 76583.6, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 134165.2, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 134165.2, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 134165.2, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 132655.9, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 132655.9, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 132655.9, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 120716.3, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 120716.3, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 120716.3, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 100888.7, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 100888.7, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 100888.7, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 110710.5, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 110710.5, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 110710.5, + "level": "n/a" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 0.9, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 0.9, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 0.9, + "level": "n/a" + }, + "dump": { + "us": 1.0, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 1.9, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 1.9, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 1.9, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 1.2, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 1.2, + "level": "n/a" + }, + "variants": { + "write": { + "us": 1.2, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 2.9, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 2.9, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 2.9, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 4.0, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 4.0, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 4.0, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 1.5, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 1.5, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 1.5, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 1.9, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 1.9, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 1.9, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 2.5, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 2.5, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 2.5, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 2.9, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 2.9, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 2.9, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2.6, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 2.6, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 2.6, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 2.7, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 2.7, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 2.7, + "level": "n/a" + } + } + } + } + } +} diff --git a/docs/mkdocs/scripts/figures/data/perf_usecases_x86-gcc13.json b/docs/mkdocs/scripts/figures/data/perf_usecases_x86-gcc13.json new file mode 100644 index 000000000..4c9f1e598 --- /dev/null +++ b/docs/mkdocs/scripts/figures/data/perf_usecases_x86-gcc13.json @@ -0,0 +1,7224 @@ +{ + "validate": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 325.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 325.3, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 318.4, + "level": "full" + }, + "parse": { + "us": 325.3, + "level": "full" + }, + "accept": { + "us": 331.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 789.1, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 789.1, + "level": "full" + }, + "variants": { + "accept": { + "us": 789.1, + "level": "full" + }, + "parse": { + "us": 3627.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 390.5, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 390.5, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 390.5, + "level": "full" + }, + "read": { + "us": 395.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 328.2, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 328.2, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 314.9, + "level": "full" + }, + "DOM": { + "us": 328.2, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 424.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 424.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 590.5, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 590.5, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 590.5, + "level": "full" + }, + "generic": { + "us": 3234.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 737.6, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 737.6, + "level": "full" + }, + "variants": { + "SAX": { + "us": 737.6, + "level": "full" + }, + "parse": { + "us": 1482.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1637.8, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1135.4, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1135.4, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 1373.5, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1552.5, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1637.8, + "level": "full" + }, + "SAX": { + "us": 2343.5, + "level": "full" + }, + "Document": { + "us": 2543.1, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 633.5, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 486.9, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 486.9, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 633.5, + "level": "full" + }, + "Value": { + "us": 3815.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 469.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 469.6, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 469.6, + "level": "full" + }, + "Value": { + "us": 563.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 591.5, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 591.5, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 578.1, + "level": "full" + }, + "tape (copy)": { + "us": 591.5, + "level": "full" + }, + "borrowed (copy)": { + "us": 1281.8, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 742.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 742.3, + "level": "full" + }, + "variants": { + "parse": { + "us": 742.3, + "level": "full" + }, + "read (reused)": { + "us": 747.5, + "level": "full" + }, + "accept": { + "us": 755.4, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 1631.1, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 1631.1, + "level": "full" + }, + "variants": { + "accept": { + "us": 1631.1, + "level": "full" + }, + "parse": { + "us": 5659.5, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 994.9, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 994.9, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 994.9, + "level": "full" + }, + "read": { + "us": 1024.8, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 809.8, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 809.8, + "level": "full" + }, + "variants": { + "DOM": { + "us": 809.8, + "level": "full" + }, + "DOM (reused)": { + "us": 814.5, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1031.5, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1031.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 1399.4, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 1399.4, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 1399.4, + "level": "full" + }, + "generic": { + "us": 5956.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 1006.8, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 1006.8, + "level": "full" + }, + "variants": { + "SAX": { + "us": 1006.8, + "level": "full" + }, + "parse": { + "us": 1900.0, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 2229.7, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 1665.7, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 1665.7, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 2006.0, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 2023.3, + "level": "no UTF-8" + }, + "SAX": { + "us": 2229.7, + "level": "full" + }, + "insitu (copy)": { + "us": 2353.0, + "level": "full" + }, + "Document": { + "us": 2578.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 1447.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1370.5, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 1370.5, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 1447.6, + "level": "full" + }, + "Value": { + "us": 6238.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 965.6, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 965.6, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 965.6, + "level": "full" + }, + "Value": { + "us": 1189.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 1425.7, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 1425.7, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 1409.5, + "level": "full" + }, + "tape (copy)": { + "us": 1425.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 3637.0, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "accept", + "us": 1698.9, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 1698.9, + "level": "full" + }, + "variants": { + "accept": { + "us": 1698.9, + "level": "full" + }, + "read (reused)": { + "us": 1699.7, + "level": "full" + }, + "parse": { + "us": 1699.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 4569.5, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 4569.5, + "level": "full" + }, + "variants": { + "accept": { + "us": 4569.5, + "level": "full" + }, + "parse": { + "us": 12253.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 5320.0, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 5320.0, + "level": "full" + }, + "variants": { + "read": { + "us": 5320.0, + "level": "full" + }, + "insitu (copy)": { + "us": 5322.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 3177.5, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 3177.5, + "level": "full" + }, + "variants": { + "DOM": { + "us": 3177.5, + "level": "full" + }, + "DOM (reused)": { + "us": 3220.4, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3618.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3618.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 1847.3, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 1847.3, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 1847.3, + "level": "full" + }, + "generic": { + "us": 19742.6, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 5464.9, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 5464.9, + "level": "full" + }, + "variants": { + "SAX": { + "us": 5464.9, + "level": "full" + }, + "parse": { + "us": 7475.1, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 11264.3, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 11264.3, + "level": "full" + }, + "variants": { + "SAX": { + "us": 11264.3, + "level": "full" + }, + "Document (no encoding check)": { + "us": 11671.6, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 11736.9, + "level": "full" + }, + "SAX (no encoding check)": { + "us": 11748.6, + "level": "no UTF-8" + }, + "Document": { + "us": 11864.0, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 12082.6, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 2401.7, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 2318.5, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 2318.5, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 2401.7, + "level": "full" + }, + "Value": { + "us": 13367.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 2249.4, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 2249.4, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 2249.4, + "level": "full" + }, + "Value": { + "us": 3754.2, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 4302.9, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 4302.9, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 4245.2, + "level": "full" + }, + "tape (copy)": { + "us": 4302.9, + "level": "full" + }, + "borrowed (copy)": { + "us": 10036.5, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "accept", + "us": 84789.7, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 84789.7, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 45936.0, + "level": "full" + }, + "accept": { + "us": 84789.7, + "level": "full" + }, + "parse": { + "us": 86197.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 94288.7, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 94288.7, + "level": "full" + }, + "variants": { + "accept": { + "us": 94288.7, + "level": "full" + }, + "parse": { + "us": 559746.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 132598.1, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 132598.1, + "level": "full" + }, + "variants": { + "read": { + "us": 132598.1, + "level": "full" + }, + "insitu (copy)": { + "us": 133444.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 121064.1, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 121064.1, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 48456.0, + "level": "full" + }, + "DOM": { + "us": 121064.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 95771.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 95771.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 71292.8, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 71292.8, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 71292.8, + "level": "full" + }, + "generic": { + "us": 384085.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 59248.7, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 59248.7, + "level": "full" + }, + "variants": { + "SAX": { + "us": 59248.7, + "level": "full" + }, + "parse": { + "us": 193186.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 209690.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 157273.7, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 157273.7, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 169612.9, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 184567.0, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 209690.7, + "level": "full" + }, + "SAX": { + "us": 276801.4, + "level": "full" + }, + "Document": { + "us": 297025.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 66822.2, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 59800.9, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 59800.9, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 66822.2, + "level": "full" + }, + "Value": { + "us": 490960.4, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 54246.3, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 54246.3, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 54246.3, + "level": "full" + }, + "Value": { + "us": 117743.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 211715.5, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 211715.5, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 135460.9, + "level": "full" + }, + "tape (copy)": { + "us": 211715.5, + "level": "full" + }, + "borrowed (copy)": { + "us": 289558.6, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "accept", + "us": 1.6, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 1.6, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1.5, + "level": "full" + }, + "accept": { + "us": 1.6, + "level": "full" + }, + "parse": { + "us": 1.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "accept", + "us": 4.0, + "level": "full" + }, + "best_any": { + "variant": "accept", + "us": 4.0, + "level": "full" + }, + "variants": { + "accept": { + "us": 4.0, + "level": "full" + }, + "parse": { + "us": 14.3, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1.7, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1.7, + "level": "full" + }, + "variants": { + "read": { + "us": 1.7, + "level": "full" + }, + "insitu (copy)": { + "us": 1.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 1.9, + "level": "full" + }, + "best_any": { + "variant": "DOM", + "us": 1.9, + "level": "full" + }, + "variants": { + "DOM (reused)": { + "us": 1.5, + "level": "full" + }, + "DOM": { + "us": 1.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1.8, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1.8, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "validate_json", + "us": 2.3, + "level": "full" + }, + "best_any": { + "variant": "validate_json", + "us": 2.3, + "level": "full" + }, + "variants": { + "validate_json": { + "us": 2.3, + "level": "full" + }, + "generic": { + "us": 13.8, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 3.2, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 3.2, + "level": "full" + }, + "variants": { + "SAX": { + "us": 3.2, + "level": "full" + }, + "parse": { + "us": 7.0, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 7.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 3.8, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 3.8, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 7.2, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 7.3, + "level": "full" + }, + "Document (no encoding check)": { + "us": 8.1, + "level": "no UTF-8" + }, + "SAX": { + "us": 12.0, + "level": "full" + }, + "Document": { + "us": 13.6, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + IgnoredAny", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1.9, + "level": "no UTF-8" + }, + "variants": { + "IgnoredAny": { + "us": 1.9, + "level": "no UTF-8" + }, + "from_utf8 + IgnoredAny": { + "us": 2.4, + "level": "full" + }, + "Value": { + "us": 12.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "IgnoredAny", + "us": 1.8, + "level": "full" + }, + "best_any": { + "variant": "IgnoredAny", + "us": 1.8, + "level": "full" + }, + "variants": { + "IgnoredAny": { + "us": 1.8, + "level": "full" + }, + "Value": { + "us": 2.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "tape (copy)", + "us": 2.8, + "level": "full" + }, + "best_any": { + "variant": "tape (copy)", + "us": 2.8, + "level": "full" + }, + "variants": { + "tape (reused)": { + "us": 2.4, + "level": "full" + }, + "tape (copy)": { + "us": 2.8, + "level": "full" + }, + "borrowed (copy)": { + "us": 5.3, + "level": "full" + } + } + } + } + }, + "sum": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 405.1, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 405.1, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 393.8, + "level": "full" + }, + "parse": { + "us": 405.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 806.9, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 806.9, + "level": "full" + }, + "variants": { + "sax": { + "us": 806.9, + "level": "full" + }, + "parse": { + "us": 3746.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 446.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 446.7, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 446.7, + "level": "full" + }, + "read": { + "us": 450.8, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 358.0, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 358.0, + "level": "full" + }, + "variants": { + "On-Demand (reused)": { + "us": 355.5, + "level": "full" + }, + "On-Demand": { + "us": 358.0, + "level": "full" + }, + "DOM (reused)": { + "us": 429.3, + "level": "full" + }, + "DOM": { + "us": 433.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 481.8, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 481.8, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 3206.1, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 2947.8, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 2947.8, + "level": "partial" + }, + "generic": { + "us": 3206.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 753.3, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 753.3, + "level": "full" + }, + "variants": { + "SAX": { + "us": 753.3, + "level": "full" + }, + "parse": { + "us": 1502.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1679.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1184.6, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1184.6, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 1372.2, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1560.9, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1679.2, + "level": "full" + }, + "SAX": { + "us": 2283.0, + "level": "full" + }, + "Document": { + "us": 2476.5, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 1318.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 1318.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 1318.2, + "level": "full" + }, + "Value": { + "us": 4058.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 494.3, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 494.3, + "level": "full" + }, + "variants": { + "visitor": { + "us": 494.3, + "level": "full" + }, + "Value": { + "us": 808.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 722.1, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 722.1, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 722.1, + "level": "full" + }, + "borrowed (reused)": { + "us": 1451.8, + "level": "full" + }, + "borrowed (copy)": { + "us": 1475.4, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 944.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 944.8, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 941.6, + "level": "full" + }, + "parse": { + "us": 944.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 1647.0, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 1647.0, + "level": "full" + }, + "variants": { + "sax": { + "us": 1647.0, + "level": "full" + }, + "parse": { + "us": 5918.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 1148.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 1148.3, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 1148.3, + "level": "full" + }, + "read": { + "us": 1150.0, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 817.1, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 817.1, + "level": "full" + }, + "variants": { + "On-Demand (reused)": { + "us": 815.9, + "level": "full" + }, + "On-Demand": { + "us": 817.1, + "level": "full" + }, + "DOM (reused)": { + "us": 1183.7, + "level": "full" + }, + "DOM": { + "us": 1189.6, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1233.9, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1233.9, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 5928.3, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 5928.3, + "level": "full" + }, + "variants": { + "generic": { + "us": 5928.3, + "level": "full" + }, + "lazy_json": { + "us": 13066.4, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 1030.3, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 1030.3, + "level": "full" + }, + "variants": { + "SAX": { + "us": 1030.3, + "level": "full" + }, + "parse": { + "us": 2036.1, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 2387.7, + "level": "full" + }, + "best_any": { + "variant": "SAX (no encoding check)", + "us": 1767.6, + "level": "no UTF-8" + }, + "variants": { + "SAX (no encoding check)": { + "us": 1767.6, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 2126.6, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 2129.4, + "level": "no UTF-8" + }, + "SAX": { + "us": 2387.7, + "level": "full" + }, + "insitu (copy)": { + "us": 2462.6, + "level": "full" + }, + "Document": { + "us": 2699.9, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 2298.7, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 2298.7, + "level": "full" + }, + "variants": { + "visitor": { + "us": 2298.7, + "level": "full" + }, + "Value": { + "us": 6416.1, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 1134.9, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 1134.9, + "level": "full" + }, + "variants": { + "visitor": { + "us": 1134.9, + "level": "full" + }, + "Value": { + "us": 1798.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 1685.7, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 1685.7, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 1685.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 3825.0, + "level": "full" + }, + "borrowed (reused)": { + "us": 3865.2, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 4037.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 4037.6, + "level": "full" + }, + "variants": { + "parse": { + "us": 4037.6, + "level": "full" + }, + "read (reused)": { + "us": 4038.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 5962.1, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 5962.1, + "level": "full" + }, + "variants": { + "sax": { + "us": 5962.1, + "level": "full" + }, + "parse": { + "us": 12643.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 5958.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 5958.7, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 5958.7, + "level": "full" + }, + "read": { + "us": 5962.0, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 3407.1, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 3407.1, + "level": "full" + }, + "variants": { + "On-Demand": { + "us": 3407.1, + "level": "full" + }, + "On-Demand (reused)": { + "us": 3415.9, + "level": "full" + }, + "DOM (reused)": { + "us": 4813.5, + "level": "full" + }, + "DOM": { + "us": 4851.7, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 4412.4, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 4412.4, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 20405.3, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 16202.7, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 16202.7, + "level": "partial" + }, + "generic": { + "us": 20405.3, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 5688.3, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 5688.3, + "level": "full" + }, + "variants": { + "SAX": { + "us": 5688.3, + "level": "full" + }, + "parse": { + "us": 7851.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX", + "us": 11029.7, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 11029.7, + "level": "full" + }, + "variants": { + "SAX": { + "us": 11029.7, + "level": "full" + }, + "SAX (no encoding check)": { + "us": 11862.3, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 12174.6, + "level": "full" + }, + "Document (no encoding check)": { + "us": 12190.6, + "level": "no UTF-8" + }, + "Document": { + "us": 12316.5, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 12595.4, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 7610.4, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 7610.4, + "level": "full" + }, + "variants": { + "visitor": { + "us": 7610.4, + "level": "full" + }, + "Value": { + "us": 14578.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 4580.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 4580.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 4580.2, + "level": "full" + }, + "Value": { + "us": 7489.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 5190.9, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 5190.9, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 5190.9, + "level": "full" + }, + "borrowed (reused)": { + "us": 11384.6, + "level": "full" + }, + "borrowed (copy)": { + "us": 11483.9, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 87781.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 87781.3, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 54112.5, + "level": "full" + }, + "parse": { + "us": 87781.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 100803.8, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 100803.8, + "level": "full" + }, + "variants": { + "sax": { + "us": 100803.8, + "level": "full" + }, + "parse": { + "us": 580467.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 138000.6, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 138000.6, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 138000.6, + "level": "full" + }, + "read": { + "us": 138521.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 90337.5, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 90337.5, + "level": "full" + }, + "variants": { + "On-Demand (reused)": { + "us": 49752.3, + "level": "full" + }, + "DOM (reused)": { + "us": 60608.5, + "level": "full" + }, + "On-Demand": { + "us": 90337.5, + "level": "full" + }, + "DOM": { + "us": 130727.4, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 105062.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 105062.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 403974.9, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 231683.1, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 231683.1, + "level": "partial" + }, + "generic": { + "us": 403974.9, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 61478.6, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 61478.6, + "level": "full" + }, + "variants": { + "SAX": { + "us": 61478.6, + "level": "full" + }, + "parse": { + "us": 198675.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 216612.1, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 161396.9, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 161396.9, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 164281.4, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 199407.5, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 216612.1, + "level": "full" + }, + "SAX": { + "us": 280258.9, + "level": "full" + }, + "Document": { + "us": 308388.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 123810.1, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 123810.1, + "level": "full" + }, + "variants": { + "visitor": { + "us": 123810.1, + "level": "full" + }, + "Value": { + "us": 526223.6, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 59149.2, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 59149.2, + "level": "full" + }, + "variants": { + "visitor": { + "us": 59149.2, + "level": "full" + }, + "Value": { + "us": 150764.0, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 220581.9, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 220581.9, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 220581.9, + "level": "full" + }, + "borrowed (reused)": { + "us": 228425.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 293609.3, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 2.1, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 2.1, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 2.0, + "level": "full" + }, + "parse": { + "us": 2.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "sax", + "us": 4.1, + "level": "full" + }, + "best_any": { + "variant": "sax", + "us": 4.1, + "level": "full" + }, + "variants": { + "sax": { + "us": 4.1, + "level": "full" + }, + "parse": { + "us": 14.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 2.0, + "level": "full" + }, + "variants": { + "read": { + "us": 2.0, + "level": "full" + }, + "insitu (copy)": { + "us": 2.0, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "On-Demand", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 2.0, + "level": "full" + }, + "variants": { + "On-Demand (reused)": { + "us": 1.7, + "level": "full" + }, + "On-Demand": { + "us": 2.0, + "level": "full" + }, + "DOM (reused)": { + "us": 2.1, + "level": "full" + }, + "DOM": { + "us": 2.5, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 2.2, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 2.2, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 13.5, + "level": "full" + }, + "best_any": { + "variant": "lazy_json", + "us": 6.0, + "level": "partial" + }, + "variants": { + "lazy_json": { + "us": 6.0, + "level": "partial" + }, + "generic": { + "us": 13.5, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "SAX", + "us": 3.2, + "level": "full" + }, + "best_any": { + "variant": "SAX", + "us": 3.2, + "level": "full" + }, + "variants": { + "SAX": { + "us": 3.2, + "level": "full" + }, + "parse": { + "us": 7.0, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 7.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 4.1, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 4.1, + "level": "no UTF-8" + }, + "SAX (no encoding check)": { + "us": 6.9, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 7.4, + "level": "full" + }, + "Document (no encoding check)": { + "us": 8.4, + "level": "no UTF-8" + }, + "SAX": { + "us": 11.8, + "level": "full" + }, + "Document": { + "us": 13.2, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "visitor", + "us": 4.3, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 4.3, + "level": "full" + }, + "variants": { + "visitor": { + "us": 4.3, + "level": "full" + }, + "Value": { + "us": 12.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "visitor", + "us": 2.4, + "level": "full" + }, + "best_any": { + "variant": "visitor", + "us": 2.4, + "level": "full" + }, + "variants": { + "visitor": { + "us": 2.4, + "level": "full" + }, + "Value": { + "us": 4.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "visitor (copy)", + "us": 3.8, + "level": "full" + }, + "best_any": { + "variant": "visitor (copy)", + "us": 3.8, + "level": "full" + }, + "variants": { + "visitor (copy)": { + "us": 3.8, + "level": "full" + }, + "borrowed (reused)": { + "us": 5.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 6.3, + "level": "full" + } + } + } + } + }, + "select": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "structs (from_json)", + "us": 347.4, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 347.4, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 333.3, + "level": "full" + }, + "structs (from_json)": { + "us": 347.4, + "level": "full" + }, + "parse": { + "us": 358.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse", + "us": 3523.0, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 3523.0, + "level": "full" + }, + "variants": { + "parse": { + "us": 3523.0, + "level": "full" + }, + "structs (from_json)": { + "us": 3655.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 408.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 408.4, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 408.4, + "level": "full" + }, + "read": { + "us": 414.5, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 337.4, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 211.4, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 207.2, + "level": "partial" + }, + "On-Demand": { + "us": 211.4, + "level": "partial" + }, + "DOM (reused)": { + "us": 331.7, + "level": "full" + }, + "DOM": { + "us": 337.4, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 419.3, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 419.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 538.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 348.4, + "level": "partial" + }, + "variants": { + "structs": { + "us": 348.4, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 538.9, + "level": "full" + }, + "lazy_json": { + "us": 958.4, + "level": "partial" + }, + "generic": { + "us": 3329.8, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1604.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1604.6, + "level": "full" + }, + "variants": { + "parse": { + "us": 1604.6, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 1779.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1193.8, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1193.8, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 1615.3, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 1779.2, + "level": "full" + }, + "Document": { + "us": 2588.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 769.2, + "level": "full" + }, + "best_any": { + "variant": "from_utf8 + structs", + "us": 769.2, + "level": "full" + }, + "variants": { + "from_utf8 + structs": { + "us": 769.2, + "level": "full" + }, + "structs": { + "us": 812.9, + "level": "no UTF-8" + }, + "Value": { + "us": 4230.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 556.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 556.9, + "level": "full" + }, + "variants": { + "structs": { + "us": 556.9, + "level": "full" + }, + "Value": { + "us": 632.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 729.9, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 729.9, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 729.9, + "level": "full" + }, + "borrowed (copy)": { + "us": 1364.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 762.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 762.6, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 761.9, + "level": "full" + }, + "parse": { + "us": 762.6, + "level": "full" + }, + "structs (from_json)": { + "us": 794.8, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 5534.0, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 5534.0, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 5534.0, + "level": "full" + }, + "parse": { + "us": 5623.7, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 995.7, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 995.7, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 995.7, + "level": "full" + }, + "read": { + "us": 1000.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 837.1, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 804.5, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 788.7, + "level": "partial" + }, + "On-Demand": { + "us": 804.5, + "level": "partial" + }, + "DOM (reused)": { + "us": 836.3, + "level": "full" + }, + "DOM": { + "us": 837.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1043.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1043.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 1475.3, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 408.3, + "level": "partial" + }, + "variants": { + "structs": { + "us": 408.3, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 1475.3, + "level": "full" + }, + "generic": { + "us": 5806.9, + "level": "full" + }, + "lazy_json": { + "us": 9183.1, + "level": "partial" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 1902.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1902.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 1902.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 2257.0, + "level": "full" + }, + "best_any": { + "variant": "Document (no encoding check)", + "us": 1923.3, + "level": "no UTF-8" + }, + "variants": { + "Document (no encoding check)": { + "us": 1923.3, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 2005.3, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 2257.0, + "level": "full" + }, + "Document": { + "us": 2535.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 1503.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1472.7, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 1472.7, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 1503.9, + "level": "full" + }, + "Value": { + "us": 6038.8, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 1022.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1022.9, + "level": "full" + }, + "variants": { + "structs": { + "us": 1022.9, + "level": "full" + }, + "Value": { + "us": 1200.9, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 1658.4, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 1658.4, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 1658.4, + "level": "full" + }, + "borrowed (copy)": { + "us": 3571.2, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1700.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1700.3, + "level": "full" + }, + "variants": { + "parse": { + "us": 1700.3, + "level": "full" + }, + "structs (from_json)": { + "us": 1702.5, + "level": "full" + }, + "read (reused)": { + "us": 1713.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse", + "us": 12683.9, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 12683.9, + "level": "full" + }, + "variants": { + "parse": { + "us": 12683.9, + "level": "full" + }, + "structs (from_json)": { + "us": 12721.4, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy)", + "us": 5374.8, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 5374.8, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 5374.8, + "level": "full" + }, + "read": { + "us": 5414.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 3282.8, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 1138.2, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 1132.1, + "level": "partial" + }, + "On-Demand": { + "us": 1138.2, + "level": "partial" + }, + "DOM (reused)": { + "us": 3227.7, + "level": "full" + }, + "DOM": { + "us": 3282.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3674.7, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3674.7, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 1850.4, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 449.3, + "level": "partial" + }, + "variants": { + "structs": { + "us": 449.3, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 1850.4, + "level": "full" + }, + "lazy_json": { + "us": 3777.1, + "level": "partial" + }, + "generic": { + "us": 20153.8, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 7604.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 7604.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 7604.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Document", + "us": 12214.5, + "level": "full" + }, + "best_any": { + "variant": "Document (no encoding check)", + "us": 12165.4, + "level": "no UTF-8" + }, + "variants": { + "Document (no encoding check)": { + "us": 12165.4, + "level": "no UTF-8" + }, + "Document": { + "us": 12214.5, + "level": "full" + }, + "insitu (copy)": { + "us": 12220.3, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 12249.8, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 2442.0, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 2322.9, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 2322.9, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 2442.0, + "level": "full" + }, + "Value": { + "us": 13892.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 2246.6, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 2246.6, + "level": "full" + }, + "variants": { + "structs": { + "us": 2246.6, + "level": "full" + }, + "Value": { + "us": 3718.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 4915.3, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 4915.3, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 4915.3, + "level": "full" + }, + "borrowed (copy)": { + "us": 10315.4, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 98540.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 98540.3, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 59200.3, + "level": "full" + }, + "parse": { + "us": 98540.3, + "level": "full" + }, + "structs (from_json)": { + "us": 115776.5, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 623070.2, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 623070.2, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 623070.2, + "level": "full" + }, + "parse": { + "us": 638969.7, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 142712.6, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 142712.6, + "level": "full" + }, + "variants": { + "read": { + "us": 142712.6, + "level": "full" + }, + "insitu (copy)": { + "us": 143620.7, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 134701.0, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 51878.1, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 30910.5, + "level": "partial" + }, + "On-Demand": { + "us": 51878.1, + "level": "partial" + }, + "DOM (reused)": { + "us": 63616.6, + "level": "full" + }, + "DOM": { + "us": 134701.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 111999.3, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 111999.3, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 99194.0, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 77564.7, + "level": "partial" + }, + "variants": { + "structs": { + "us": 77564.7, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 99194.0, + "level": "full" + }, + "lazy_json": { + "us": 123768.8, + "level": "partial" + }, + "generic": { + "us": 433836.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 214973.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 214973.3, + "level": "full" + }, + "variants": { + "parse": { + "us": 214973.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 226825.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 175262.1, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 175262.1, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 209366.0, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 226825.4, + "level": "full" + }, + "Document": { + "us": 316379.3, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 108385.8, + "level": "full" + }, + "best_any": { + "variant": "from_utf8 + structs", + "us": 108385.8, + "level": "full" + }, + "variants": { + "from_utf8 + structs": { + "us": 108385.8, + "level": "full" + }, + "structs": { + "us": 138827.1, + "level": "no UTF-8" + }, + "Value": { + "us": 560794.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 91995.7, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 91995.7, + "level": "full" + }, + "variants": { + "structs": { + "us": 91995.7, + "level": "full" + }, + "Value": { + "us": 145370.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 266072.7, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 266072.7, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 266072.7, + "level": "full" + }, + "borrowed (copy)": { + "us": 328257.2, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse", + "us": 1.7, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 1.7, + "level": "full" + }, + "variants": { + "read (reused)": { + "us": 1.6, + "level": "full" + }, + "parse": { + "us": 1.7, + "level": "full" + }, + "structs (from_json)": { + "us": 1.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "structs (from_json)", + "us": 13.6, + "level": "full" + }, + "best_any": { + "variant": "structs (from_json)", + "us": 13.6, + "level": "full" + }, + "variants": { + "structs (from_json)": { + "us": 13.6, + "level": "full" + }, + "parse": { + "us": 14.0, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read", + "us": 1.8, + "level": "full" + }, + "best_any": { + "variant": "read", + "us": 1.8, + "level": "full" + }, + "variants": { + "read": { + "us": 1.8, + "level": "full" + }, + "insitu (copy)": { + "us": 1.8, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM", + "us": 2.1, + "level": "full" + }, + "best_any": { + "variant": "On-Demand", + "us": 1.4, + "level": "partial" + }, + "variants": { + "On-Demand (reused)": { + "us": 1.1, + "level": "partial" + }, + "On-Demand": { + "us": 1.4, + "level": "partial" + }, + "DOM (reused)": { + "us": 1.7, + "level": "full" + }, + "DOM": { + "us": 2.1, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1.9, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1.9, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "structs (validate_skipped)", + "us": 1.9, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 1.5, + "level": "partial" + }, + "variants": { + "structs": { + "us": 1.5, + "level": "partial" + }, + "structs (validate_skipped)": { + "us": 1.9, + "level": "full" + }, + "lazy_json": { + "us": 2.2, + "level": "partial" + }, + "generic": { + "us": 14.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 6.7, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 6.7, + "level": "full" + }, + "variants": { + "parse": { + "us": 6.7, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 7.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 3.9, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 3.9, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 7.2, + "level": "full" + }, + "Document (no encoding check)": { + "us": 8.2, + "level": "no UTF-8" + }, + "Document": { + "us": 13.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "from_utf8 + structs", + "us": 3.1, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 3.0, + "level": "no UTF-8" + }, + "variants": { + "structs": { + "us": 3.0, + "level": "no UTF-8" + }, + "from_utf8 + structs": { + "us": 3.1, + "level": "full" + }, + "Value": { + "us": 14.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "structs", + "us": 2.0, + "level": "full" + }, + "best_any": { + "variant": "structs", + "us": 2.0, + "level": "full" + }, + "variants": { + "structs": { + "us": 2.0, + "level": "full" + }, + "Value": { + "us": 2.8, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "structs (copy)", + "us": 3.6, + "level": "full" + }, + "best_any": { + "variant": "structs (copy)", + "us": 3.6, + "level": "full" + }, + "variants": { + "structs (copy)": { + "us": 3.6, + "level": "full" + }, + "borrowed (copy)": { + "us": 5.4, + "level": "full" + } + } + } + } + }, + "edit": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "editable", + "us": 552.3, + "level": "full" + }, + "best_any": { + "variant": "editable", + "us": 552.3, + "level": "full" + }, + "variants": { + "editable": { + "us": 552.3, + "level": "full" + }, + "editable (source numbers)": { + "us": 599.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 3156.3, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 3156.3, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 3156.3, + "level": "full" + }, + "parse": { + "us": 4390.3, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + mut copy", + "us": 810.5, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + mut copy", + "us": 810.5, + "level": "full" + }, + "variants": { + "insitu (copy) + mut copy": { + "us": 810.5, + "level": "full" + }, + "mut copy": { + "us": 842.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 663.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 663.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 3766.7, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 3766.7, + "level": "full" + }, + "variants": { + "generic": { + "us": 3766.7, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 2025.8, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 2025.8, + "level": "full" + }, + "variants": { + "parse": { + "us": 2025.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 2511.4, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 1896.1, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 1896.1, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 2172.2, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 2511.4, + "level": "full" + }, + "Document": { + "us": 3264.6, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 4474.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 4474.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 4474.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 1188.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 1188.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 1188.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 2071.4, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 2071.4, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 2071.4, + "level": "full" + }, + "owned (copy)": { + "us": 2880.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "editable", + "us": 1112.2, + "level": "full" + }, + "best_any": { + "variant": "editable", + "us": 1112.2, + "level": "full" + }, + "variants": { + "editable": { + "us": 1112.2, + "level": "full" + }, + "editable (source numbers)": { + "us": 1188.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 5279.9, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 5279.9, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 5279.9, + "level": "full" + }, + "parse": { + "us": 6291.3, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + mut copy", + "us": 1723.9, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + mut copy", + "us": 1723.9, + "level": "full" + }, + "variants": { + "insitu (copy) + mut copy": { + "us": 1723.9, + "level": "full" + }, + "mut copy": { + "us": 1725.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 1572.2, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 1572.2, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 6532.1, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 6532.1, + "level": "full" + }, + "variants": { + "generic": { + "us": 6532.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 2943.3, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 2943.3, + "level": "full" + }, + "variants": { + "parse": { + "us": 2943.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 3309.5, + "level": "full" + }, + "best_any": { + "variant": "Document (no encoding check)", + "us": 2941.7, + "level": "no UTF-8" + }, + "variants": { + "Document (no encoding check)": { + "us": 2941.7, + "level": "no UTF-8" + }, + "insitu (copy) (no encoding check)": { + "us": 2981.5, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 3309.5, + "level": "full" + }, + "Document": { + "us": 3527.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 6922.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 6922.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 6922.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2383.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 2383.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 2383.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 4465.1, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 4465.1, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 4465.1, + "level": "full" + }, + "owned (copy)": { + "us": 5204.4, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "editable (source numbers)", + "us": 2962.1, + "level": "full" + }, + "best_any": { + "variant": "editable (source numbers)", + "us": 2962.1, + "level": "full" + }, + "variants": { + "editable (source numbers)": { + "us": 2962.1, + "level": "full" + }, + "editable": { + "us": 6027.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 16246.8, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 16246.8, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 16246.8, + "level": "full" + }, + "parse": { + "us": 16580.2, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 9805.6, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 9805.6, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 9805.6, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 9829.4, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 8879.0, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 8879.0, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 24351.4, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 24351.4, + "level": "full" + }, + "variants": { + "generic": { + "us": 24351.4, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 13352.1, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 13352.1, + "level": "full" + }, + "variants": { + "parse": { + "us": 13352.1, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 20627.0, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy)", + "us": 20627.0, + "level": "full" + }, + "variants": { + "insitu (copy)": { + "us": 20627.0, + "level": "full" + }, + "Document (no encoding check)": { + "us": 20682.6, + "level": "no UTF-8" + }, + "Document": { + "us": 20913.9, + "level": "full" + }, + "insitu (copy) (no encoding check)": { + "us": 21105.8, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 18301.0, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 18301.0, + "level": "full" + }, + "variants": { + "Value": { + "us": 18301.0, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 8007.1, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 8007.1, + "level": "full" + }, + "variants": { + "Value": { + "us": 8007.1, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "owned (copy)", + "us": 16360.2, + "level": "full" + }, + "best_any": { + "variant": "owned (copy)", + "us": 16360.2, + "level": "full" + }, + "variants": { + "owned (copy)": { + "us": 16360.2, + "level": "full" + }, + "borrowed (copy)": { + "us": 16446.2, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "editable", + "us": 203216.6, + "level": "full" + }, + "best_any": { + "variant": "editable", + "us": 203216.6, + "level": "full" + }, + "variants": { + "editable": { + "us": 203216.6, + "level": "full" + }, + "editable (source numbers)": { + "us": 212433.3, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 922462.9, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 922462.9, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 922462.9, + "level": "full" + }, + "parse": { + "us": 1174537.9, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + mut copy", + "us": 322621.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + mut copy", + "us": 322621.3, + "level": "full" + }, + "variants": { + "insitu (copy) + mut copy": { + "us": 322621.3, + "level": "full" + }, + "mut copy": { + "us": 344750.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 181438.1, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 181438.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 940279.8, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 940279.8, + "level": "full" + }, + "variants": { + "generic": { + "us": 940279.8, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 337631.6, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 337631.6, + "level": "full" + }, + "variants": { + "parse": { + "us": 337631.6, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 362717.3, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 314374.8, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 314374.8, + "level": "no UTF-8" + }, + "Document (no encoding check)": { + "us": 332617.6, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 362717.3, + "level": "full" + }, + "Document": { + "us": 441350.1, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 805289.9, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 805289.9, + "level": "full" + }, + "variants": { + "Value": { + "us": 805289.9, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 413714.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 413714.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 413714.2, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 416658.4, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 416658.4, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 416658.4, + "level": "full" + }, + "owned (copy)": { + "us": 701262.6, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "editable", + "us": 3.3, + "level": "full" + }, + "best_any": { + "variant": "editable", + "us": 3.3, + "level": "full" + }, + "variants": { + "editable": { + "us": 3.3, + "level": "full" + }, + "editable (source numbers)": { + "us": 3.6, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "ordered_json", + "us": 15.0, + "level": "full" + }, + "best_any": { + "variant": "ordered_json", + "us": 15.0, + "level": "full" + }, + "variants": { + "ordered_json": { + "us": 15.0, + "level": "full" + }, + "parse": { + "us": 17.1, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "mut copy", + "us": 3.8, + "level": "full" + }, + "best_any": { + "variant": "mut copy", + "us": 3.8, + "level": "full" + }, + "variants": { + "mut copy": { + "us": 3.8, + "level": "full" + }, + "insitu (copy) + mut copy": { + "us": 3.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document", + "us": 3.6, + "level": "no UTF-8" + }, + "variants": { + "Document": { + "us": 3.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 16.2, + "level": "full" + }, + "best_any": { + "variant": "generic", + "us": 16.2, + "level": "full" + }, + "variants": { + "generic": { + "us": 16.2, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse", + "us": 9.4, + "level": "full" + }, + "best_any": { + "variant": "parse", + "us": 9.4, + "level": "full" + }, + "variants": { + "parse": { + "us": 9.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "insitu (copy)", + "us": 11.6, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) (no encoding check)", + "us": 7.9, + "level": "no UTF-8" + }, + "variants": { + "insitu (copy) (no encoding check)": { + "us": 7.9, + "level": "no UTF-8" + }, + "insitu (copy)": { + "us": 11.6, + "level": "full" + }, + "Document (no encoding check)": { + "us": 12.4, + "level": "no UTF-8" + }, + "Document": { + "us": 17.1, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 21.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 21.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 21.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 6.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 6.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 6.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 9.0, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 9.0, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 9.0, + "level": "full" + }, + "owned (copy)": { + "us": 14.6, + "level": "full" + } + } + } + } + }, + "minify": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 489.1, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 489.1, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 487.0, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 489.1, + "level": "full" + }, + "parse + dump": { + "us": 497.4, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 3980.3, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 3980.3, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 3980.3, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + write", + "us": 657.2, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + write", + "us": 657.2, + "level": "full" + }, + "variants": { + "insitu (copy) + write": { + "us": 657.2, + "level": "full" + }, + "read + write": { + "us": 670.3, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 838.7, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 127.5, + "level": "partial" + }, + "variants": { + "minify": { + "us": 127.5, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 826.0, + "level": "full" + }, + "DOM + to_string": { + "us": 838.7, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 667.1, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 667.1, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 3646.9, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 427.9, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 427.9, + "level": "partial" + }, + "generic": { + "us": 3646.9, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 1931.3, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 1931.3, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 1931.3, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer (raw numbers)", + "us": 2932.4, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 1871.5, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 1871.5, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 1910.0, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 2247.8, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 2932.4, + "level": "full" + }, + "SAX to Writer": { + "us": 2962.9, + "level": "full" + }, + "Document + Writer": { + "us": 3208.2, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 4081.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 4081.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 4081.3, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 987.7, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 987.7, + "level": "full" + }, + "variants": { + "Value": { + "us": 987.7, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 1924.3, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 1924.3, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 1924.3, + "level": "full" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 1007.5, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 1007.5, + "level": "full" + }, + "variants": { + "parse + dump (source numbers)": { + "us": 1007.5, + "level": "full" + }, + "read + dump (reused)": { + "us": 1018.6, + "level": "full" + }, + "parse + dump": { + "us": 1028.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 6495.0, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 6495.0, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 6495.0, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 1326.4, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 1326.4, + "level": "full" + }, + "variants": { + "read + write": { + "us": 1326.4, + "level": "full" + }, + "insitu (copy) + write": { + "us": 1326.6, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 1588.0, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 322.2, + "level": "partial" + }, + "variants": { + "minify": { + "us": 322.2, + "level": "partial" + }, + "DOM + to_string": { + "us": 1588.0, + "level": "full" + }, + "DOM (reused) + to_string": { + "us": 1607.7, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 1567.9, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 1567.9, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 6502.9, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 1143.7, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 1143.7, + "level": "partial" + }, + "generic": { + "us": 6502.9, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 2902.4, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 2902.4, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 2902.4, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer", + "us": 3189.2, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 2490.4, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 2490.4, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 2863.9, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 2966.5, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 3189.2, + "level": "full" + }, + "SAX to Writer (raw numbers)": { + "us": 3411.3, + "level": "full" + }, + "Document + Writer": { + "us": 3518.4, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 6879.5, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 6879.5, + "level": "full" + }, + "variants": { + "Value": { + "us": 6879.5, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2093.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 2093.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 2093.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 4375.1, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 4375.1, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 4375.1, + "level": "full" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 2688.2, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 2688.2, + "level": "full" + }, + "variants": { + "parse + dump (source numbers)": { + "us": 2688.2, + "level": "full" + }, + "read + dump (reused)": { + "us": 5862.6, + "level": "full" + }, + "parse + dump": { + "us": 5929.9, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 17572.6, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 17572.6, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 17572.6, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "insitu (copy) + write", + "us": 9201.8, + "level": "full" + }, + "best_any": { + "variant": "insitu (copy) + write", + "us": 9201.8, + "level": "full" + }, + "variants": { + "insitu (copy) + write": { + "us": 9201.8, + "level": "full" + }, + "read + write": { + "us": 9403.4, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 14645.1, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 469.3, + "level": "partial" + }, + "variants": { + "minify": { + "us": 469.3, + "level": "partial" + }, + "DOM + to_string": { + "us": 14645.1, + "level": "full" + }, + "DOM (reused) + to_string": { + "us": 14704.8, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 9006.6, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 9006.6, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 25082.1, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 2468.2, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 2468.2, + "level": "partial" + }, + "generic": { + "us": 25082.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 13756.2, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 13756.2, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 13756.2, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer (raw numbers)", + "us": 15260.2, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (raw numbers)", + "us": 15260.2, + "level": "full" + }, + "variants": { + "SAX to Writer (raw numbers)": { + "us": 15260.2, + "level": "full" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 15634.1, + "level": "no UTF-8" + }, + "Document + Writer": { + "us": 21761.0, + "level": "full" + }, + "Document + Writer (no encoding check)": { + "us": 21899.9, + "level": "no UTF-8" + }, + "SAX to Writer": { + "us": 22107.1, + "level": "full" + }, + "SAX to Writer (no encoding check)": { + "us": 22363.4, + "level": "no UTF-8" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 17248.7, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 17248.7, + "level": "full" + }, + "variants": { + "Value": { + "us": 17248.7, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 7774.6, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 7774.6, + "level": "full" + }, + "variants": { + "Value": { + "us": 7774.6, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 15278.3, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 15278.3, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 15278.3, + "level": "full" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump (source numbers)", + "us": 155982.1, + "level": "full" + }, + "best_any": { + "variant": "parse + dump (source numbers)", + "us": 155982.1, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 115960.3, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 155982.1, + "level": "full" + }, + "parse + dump": { + "us": 156014.1, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 730814.0, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 730814.0, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 730814.0, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 195618.4, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 195618.4, + "level": "full" + }, + "variants": { + "read + write": { + "us": 195618.4, + "level": "full" + }, + "insitu (copy) + write": { + "us": 203878.4, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 292317.0, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 50455.7, + "level": "partial" + }, + "variants": { + "minify": { + "us": 50455.7, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 232142.2, + "level": "full" + }, + "DOM + to_string": { + "us": 292317.0, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 174143.9, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 174143.9, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 546002.6, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 94867.1, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 94867.1, + "level": "partial" + }, + "generic": { + "us": 546002.6, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 328320.9, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 328320.9, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 328320.9, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer (raw numbers)", + "us": 393456.6, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (no encoding check)", + "us": 282972.7, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (no encoding check)": { + "us": 282972.7, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 286953.7, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 322569.0, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 393456.6, + "level": "full" + }, + "SAX to Writer": { + "us": 406899.1, + "level": "full" + }, + "Document + Writer": { + "us": 434924.0, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 615033.2, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 615033.2, + "level": "full" + }, + "variants": { + "Value": { + "us": 615033.2, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 217697.4, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 217697.4, + "level": "full" + }, + "variants": { + "Value": { + "us": 217697.4, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 419473.7, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 419473.7, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 419473.7, + "level": "full" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "parse + dump", + "us": 2.6, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 2.6, + "level": "full" + }, + "variants": { + "read + dump (reused)": { + "us": 2.5, + "level": "full" + }, + "parse + dump": { + "us": 2.6, + "level": "full" + }, + "parse + dump (source numbers)": { + "us": 2.7, + "level": "full" + } + } + }, + "nlohmann json": { + "best": { + "variant": "parse + dump", + "us": 16.5, + "level": "full" + }, + "best_any": { + "variant": "parse + dump", + "us": 16.5, + "level": "full" + }, + "variants": { + "parse + dump": { + "us": 16.5, + "level": "full" + } + } + }, + "yyjson": { + "best": { + "variant": "read + write", + "us": 3.1, + "level": "full" + }, + "best_any": { + "variant": "read + write", + "us": 3.1, + "level": "full" + }, + "variants": { + "read + write": { + "us": 3.1, + "level": "full" + }, + "insitu (copy) + write": { + "us": 3.1, + "level": "full" + } + } + }, + "simdjson": { + "best": { + "variant": "DOM + to_string", + "us": 4.9, + "level": "full" + }, + "best_any": { + "variant": "minify", + "us": 0.6, + "level": "partial" + }, + "variants": { + "minify": { + "us": 0.6, + "level": "partial" + }, + "DOM (reused) + to_string": { + "us": 4.7, + "level": "full" + }, + "DOM + to_string": { + "us": 4.9, + "level": "full" + } + } + }, + "sonic-cpp": { + "best": null, + "best_any": { + "variant": "Document + Serialize", + "us": 3.5, + "level": "no UTF-8" + }, + "variants": { + "Document + Serialize": { + "us": 3.5, + "level": "no UTF-8" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 16.1, + "level": "full" + }, + "best_any": { + "variant": "minify_json", + "us": 2.0, + "level": "partial" + }, + "variants": { + "minify_json": { + "us": 2.0, + "level": "partial" + }, + "generic": { + "us": 16.1, + "level": "full" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "parse + serialize", + "us": 9.8, + "level": "full" + }, + "best_any": { + "variant": "parse + serialize", + "us": 9.8, + "level": "full" + }, + "variants": { + "parse + serialize": { + "us": 9.8, + "level": "full" + } + } + }, + "RapidJSON": { + "best": { + "variant": "SAX to Writer (raw numbers)", + "us": 15.6, + "level": "full" + }, + "best_any": { + "variant": "SAX to Writer (raw numbers) (no encoding check)", + "us": 10.9, + "level": "no UTF-8" + }, + "variants": { + "SAX to Writer (raw numbers) (no encoding check)": { + "us": 10.9, + "level": "no UTF-8" + }, + "SAX to Writer (no encoding check)": { + "us": 11.1, + "level": "no UTF-8" + }, + "Document + Writer (no encoding check)": { + "us": 12.7, + "level": "no UTF-8" + }, + "SAX to Writer (raw numbers)": { + "us": 15.6, + "level": "full" + }, + "SAX to Writer": { + "us": 15.7, + "level": "full" + }, + "Document + Writer": { + "us": 17.8, + "level": "full" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 18.4, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 18.4, + "level": "full" + }, + "variants": { + "Value": { + "us": 18.4, + "level": "full" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 5.3, + "level": "full" + }, + "best_any": { + "variant": "Value", + "us": 5.3, + "level": "full" + }, + "variants": { + "Value": { + "us": 5.3, + "level": "full" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed (copy)", + "us": 8.7, + "level": "full" + }, + "best_any": { + "variant": "borrowed (copy)", + "us": 8.7, + "level": "full" + }, + "variants": { + "borrowed (copy)": { + "us": 8.7, + "level": "full" + } + } + } + } + }, + "write": { + "twitter": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 147.7, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 147.7, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 147.7, + "level": "n/a" + }, + "dump": { + "us": 152.7, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 440.9, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 440.9, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 440.9, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 216.1, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 216.1, + "level": "n/a" + }, + "variants": { + "write": { + "us": 216.1, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 491.2, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 491.2, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 491.2, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 745.7, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 745.7, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 745.7, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 269.7, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 269.7, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 269.7, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 364.5, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 364.5, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 364.5, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 477.6, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 477.6, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 477.6, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 562.8, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 562.8, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 562.8, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 442.3, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 442.3, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 442.3, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 604.4, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 604.4, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 604.4, + "level": "n/a" + } + } + } + }, + "citm_catalog": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 252.9, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 252.9, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 252.9, + "level": "n/a" + }, + "dump": { + "us": 271.3, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 627.7, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 627.7, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 627.7, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 331.1, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 331.1, + "level": "n/a" + }, + "variants": { + "write": { + "us": 331.1, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 749.5, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 749.5, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 749.5, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 1031.5, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 1031.5, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 1031.5, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 532.8, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 532.8, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 532.8, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 712.4, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 712.4, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 712.4, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 1014.6, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 1014.6, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 1014.6, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 882.5, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 882.5, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 882.5, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 934.6, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 934.6, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 934.6, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 809.4, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 809.4, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 809.4, + "level": "n/a" + } + } + } + }, + "canada": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 871.4, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 871.4, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 871.4, + "level": "n/a" + }, + "dump": { + "us": 3934.5, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 4091.1, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 4091.1, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 4091.1, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 3620.4, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 3620.4, + "level": "n/a" + }, + "variants": { + "write": { + "us": 3620.4, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 10839.6, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 10839.6, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 10839.6, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 8772.8, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 8772.8, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 8772.8, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 5100.0, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 5100.0, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 5100.0, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 4265.3, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 4265.3, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 4265.3, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 5750.2, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 5750.2, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 5750.2, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 3978.8, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 3978.8, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 3978.8, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 3954.2, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 3954.2, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 3954.2, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 4824.9, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 4824.9, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 4824.9, + "level": "n/a" + } + } + } + }, + "jeopardy": { + "nlohmann json_document": { + "best": { + "variant": "dump (source numbers)", + "us": 70980.8, + "level": "n/a" + }, + "best_any": { + "variant": "dump (source numbers)", + "us": 70980.8, + "level": "n/a" + }, + "variants": { + "dump (source numbers)": { + "us": 70980.8, + "level": "n/a" + }, + "dump": { + "us": 72105.9, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 129455.0, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 129455.0, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 129455.0, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 76732.7, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 76732.7, + "level": "n/a" + }, + "variants": { + "write": { + "us": 76732.7, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 196092.2, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 196092.2, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 196092.2, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 150333.7, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 150333.7, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 150333.7, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 80556.4, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 80556.4, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 80556.4, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 143981.2, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 143981.2, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 143981.2, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 137839.7, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 137839.7, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 137839.7, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 120716.3, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 120716.3, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 120716.3, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 100888.7, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 100888.7, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 100888.7, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 110710.5, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 110710.5, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 110710.5, + "level": "n/a" + } + } + } + }, + "status": { + "nlohmann json_document": { + "best": { + "variant": "dump", + "us": 0.9, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 0.9, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 0.9, + "level": "n/a" + }, + "dump (source numbers)": { + "us": 0.9, + "level": "n/a" + } + } + }, + "nlohmann json": { + "best": { + "variant": "dump", + "us": 2.0, + "level": "n/a" + }, + "best_any": { + "variant": "dump", + "us": 2.0, + "level": "n/a" + }, + "variants": { + "dump": { + "us": 2.0, + "level": "n/a" + } + } + }, + "yyjson": { + "best": { + "variant": "write", + "us": 1.2, + "level": "n/a" + }, + "best_any": { + "variant": "write", + "us": 1.2, + "level": "n/a" + }, + "variants": { + "write": { + "us": 1.2, + "level": "n/a" + } + } + }, + "simdjson": { + "best": { + "variant": "to_string", + "us": 2.9, + "level": "n/a" + }, + "best_any": { + "variant": "to_string", + "us": 2.9, + "level": "n/a" + }, + "variants": { + "to_string": { + "us": 2.9, + "level": "n/a" + } + } + }, + "RapidJSON": { + "best": { + "variant": "Writer", + "us": 4.3, + "level": "n/a" + }, + "best_any": { + "variant": "Writer", + "us": 4.3, + "level": "n/a" + }, + "variants": { + "Writer": { + "us": 4.3, + "level": "n/a" + } + } + }, + "sonic-cpp": { + "best": { + "variant": "Serialize", + "us": 1.5, + "level": "n/a" + }, + "best_any": { + "variant": "Serialize", + "us": 1.5, + "level": "n/a" + }, + "variants": { + "Serialize": { + "us": 1.5, + "level": "n/a" + } + } + }, + "Glaze": { + "best": { + "variant": "generic", + "us": 1.9, + "level": "n/a" + }, + "best_any": { + "variant": "generic", + "us": 1.9, + "level": "n/a" + }, + "variants": { + "generic": { + "us": 1.9, + "level": "n/a" + } + } + }, + "Boost.JSON": { + "best": { + "variant": "serialize", + "us": 2.5, + "level": "n/a" + }, + "best_any": { + "variant": "serialize", + "us": 2.5, + "level": "n/a" + }, + "variants": { + "serialize": { + "us": 2.5, + "level": "n/a" + } + } + }, + "serde_json": { + "best": { + "variant": "Value", + "us": 2.9, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 2.9, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 2.9, + "level": "n/a" + } + } + }, + "sonic-rs": { + "best": { + "variant": "Value", + "us": 2.6, + "level": "n/a" + }, + "best_any": { + "variant": "Value", + "us": 2.6, + "level": "n/a" + }, + "variants": { + "Value": { + "us": 2.6, + "level": "n/a" + } + } + }, + "simd-json": { + "best": { + "variant": "borrowed", + "us": 2.7, + "level": "n/a" + }, + "best_any": { + "variant": "borrowed", + "us": 2.7, + "level": "n/a" + }, + "variants": { + "borrowed": { + "us": 2.7, + "level": "n/a" + } + } + } + } + } +} diff --git a/docs/mkdocs/scripts/figures/perf_blog.py b/docs/mkdocs/scripts/figures/perf_blog.py index d1476459a..3b0db8dfc 100644 --- a/docs/mkdocs/scripts/figures/perf_blog.py +++ b/docs/mkdocs/scripts/figures/perf_blog.py @@ -3,22 +3,24 @@ Generated files: - perf_blog_overview.svg: speedup of 3.13.0 over 3.12.0 per workload (Google Benchmark suite) +- perf_blog_distribution.svg: how many of the suite's benchmarks got how much faster (data/perf_suite.csv) - perf_blog_timeline_.svg: speedup over 3.12.0 of eight workloads at every develop commit that changed json.hpp or json_view.hpp since 3.12.0, one panel each - perf_blog_swar.svg: the eight-byte string test on one word of input - perf_blog_cliffs.svg: operations that were quadratic or worse, 3.12.0 against 3.13.0 (log scale) -- perf_blog_view.svg: parse throughput of json_document and six other document parsers -- perf_blog_view_dump.svg: write throughput of the same engines, each writing a document parsed beforehand +- perf_blog_usecases_.svg: libraries x use cases, time relative to the fastest fully validating library + (data/perf_usecases_.json); perf_blog_tables.py prints the tables of the appendix from the same data The numbers are copied from the tables of the post (the timeline from data/perf_timeline.csv, which `tests/benchmarks/history/history.py summarize` writes); the tables stay on the page as the accessible fallback. Update both together. Like the figures of charts.py, the SVGs are not images: the page includes their text with -`--8<-- "images/.svg"`, so they follow the colours and fonts of the page (`nj-charts` rules in +`--8<-- "images/.svg"`, so they follow the colors and fonts of the page (`nj-charts` rules in docs/css/fig-charts.css, `nj-fig` rules in docs/css/brand.css). Run `python3 scripts/figures/perf_blog.py` from docs/mkdocs after changing data or drawing, and commit the generated files. """ import csv import html +import json import math import re from pathlib import Path @@ -29,7 +31,8 @@ MINUS = "−" TIMES = "×" # words the abbreviation extension (includes/glossary.md) would wrap in inside the SVG text -ABBR = re.compile(r"(?' % (X(1), top, X(1), axis_y)) b.append('' % (X(0), top, X(0), axis_y)) - b.append('speedup over 3.12.0, more is better (the line at 1%s is 3.12.0)' % (L, 18, TIMES)) - write("perf_blog_overview.svg", W, axis_y + 28, "nj-charts--blog", "nj-blog-overview", + b.append('speedup over 3.12.0 (3.12.0 = 1%s), more is better' + % ((L + R) / 2, axis_y + 34, TIMES)) + write("perf_blog_overview.svg", W, axis_y + 44, "nj-charts--blog", "nj-blog-overview", "Speedup of 3.13.0 over 3.12.0 per workload, Apple M1 Max, Apple clang", "Horizontal bars of the speedup, more is better. " + "; ".join(desc) + ".", b) +# ---------- distribution: how many of the suite's benchmarks got how much faster ---------- +# bins of the speedup (3.12.0 time / 3.13.0 time) over all rows of data/perf_suite.csv +BINS = [(0, 1, "below 1" + TIMES), (1, 1.5, "1 to 1.5" + TIMES), (1.5, 2, "1.5 to 2" + TIMES), + (2, 3, "2 to 3" + TIMES), (3, 5, "3 to 5" + TIMES), (5, 10, "5 to 10" + TIMES), (10, 1e9, "10" + TIMES + " or more")] + + +def distribution(): + rows = list(csv.DictReader((HERE / "data" / "perf_suite.csv").open())) + s = sorted(float(r["speedup"]) for r in rows) + n = len(s) + counts = [sum(lo <= v < hi for v in s) for lo, hi, _ in BINS] + geo = math.exp(sum(math.log(v) for v in s) / n) + med = (s[(n - 1) // 2] + s[n // 2]) / 2 + W, H = 560, 250 + L, R, T, B = 52, 548, 16, 196 + hi = 10 * math.ceil(max(counts) / 10 + 0.4) + Y = lambda c: B - c / hi * (B - T) + slot = (R - L) / len(BINS) + b, desc = [], [] + for t in range(0, hi + 1, 20): + b.append('' % (L, Y(t), R, Y(t))) + b.append('%d' % (L - 6, Y(t) + 4, t)) + for k, ((lo, _, label), c) in enumerate(zip(BINS, counts)): + x = L + k * slot + 8 + w = slot - 16 + cls = "nj-charts-c2" if lo < 1 else "nj-charts-c1" + b.append('%s: %d' + % (cls, x, Y(c), w, B - Y(c), label, c)) + b.append('%d' % (x + w / 2, Y(c) - 5, c)) + b.append('%s' % (x + w / 2, B + 16, label)) + desc.append("%s: %d" % (label.replace(TIMES, "x"), c)) + b.append('' % (L, B, R, B)) + b.append('speedup over 3.12.0, more is better' % ((L + R) / 2, H - 10)) + b.append('number of benchmarks' % (-(T + B) / 2)) + print("distribution: median %s, geometric mean %s" % (fx(med), fx(geo))) + write("perf_blog_distribution.svg", W, H, "nj-charts--blog", "nj-blog-dist", + "Speedup of 3.13.0 over 3.12.0 for all %d benchmarks of the suite" % n, + "Bars counting the benchmarks per speedup range: " + "; ".join(desc) + + ". Median %s, geometric mean %s." % (fx(med).replace(TIMES, "x"), fx(geo).replace(TIMES, "x")), b) + + # ---------- timeline: one panel per workload ---------- -# (column in perf_timeline.csv, panel title, [PR numbers to label]) +# (column in perf_timeline.csv, panel title, [(PR, label)]): each labeled step shows the number of the theme that +# explains it ("U" for the UTF-8 check of the binary readers that came and went); the appendix maps steps to PRs TIMELINE = [ - ("parse_citm", "parse() citm_catalog.json", [5234, 5283, 5592, 5809, 5810, 5882]), - ("parse_canada", "parse() canada.json", [5234, 5283, 5617, 5738, 5851, 5882]), - ("accept_twitter", "accept() twitter.json", [5234, 5283, 5592, 5809, 5810, 5853]), - ("parse_twitter_ifstream", "parse() twitter.json, std::ifstream", [5828, 5884]), - ("dump_twitter", "dump() twitter.json", [5285, 5738, 5878, 5883]), - ("dump_canada", "dump() canada.json", [5285, 5634]), - ("from_cbor_twitter", "from_cbor() twitter", [5233, 5501, 5185, 5746]), - ("to_cbor_twitter", "to_cbor() twitter", [5328, 5824, 5885]), + ("parse_citm", "parse() citm_catalog.json", [(5234, "4"), (5283, "1"), (5592, "4"), (5809, "4"), (5810, "2"), (5882, "4")]), + ("parse_canada", "parse() canada.json", [(5234, "4"), (5283, "1"), (5617, "3"), (5738, "3"), (5851, "3"), (5882, "4")]), + ("accept_twitter", "accept() twitter.json", [(5234, "4"), (5283, "1"), (5592, "4"), (5809, "4"), (5810, "2"), (5853, "2")]), + ("parse_twitter_ifstream", "parse() twitter.json, std::ifstream", [(5828, "1"), (5884, "1")]), + ("dump_twitter", "dump() twitter.json", [(5285, "6"), (5738, "2"), (5878, "2"), (5883, "2")]), + ("dump_canada", "dump() canada.json", [(5285, "6"), (5634, "3")]), + ("from_cbor_twitter", "from_cbor() twitter", [(5233, "1"), (5501, "4"), (5185, "U"), (5746, "U")]), + ("to_cbor_twitter", "to_cbor() twitter", [(5328, "4"), (5824, "6"), (5885, "6")]), ] MONTHS = [("2025-04", "3.12.0"), ("2026-09", "Sep 2026"), ("2026-10", "Oct")] @@ -190,7 +236,7 @@ def timeline(): rows = list(csv.DictReader((HERE / "data" / "perf_timeline.csv").open())) n = len(rows) W, H = 340, 270 - L, R, T, B = 44, 330, 62, 208 + L, R, T, B = 44, 330, 66, 208 for col, title, labels in TIMELINE: vals = [float(r[col]) if r[col] else None for r in rows] base = vals[0] @@ -227,35 +273,38 @@ def timeline(): # labels for named steps: a dot at the commit and its PR number above it; PRs a few commits apart share a # label, and a label that would overlap one already placed moves up groups = [] - for pr in labels: + for pr, lab in labels: i = next(k for k, r in enumerate(rows) if r["pr"] == str(pr)) if groups and X(i) - X(groups[-1][-1][1]) < 6: - groups[-1].append((pr, i)) + groups[-1].append((pr, i, lab)) else: - groups.append([(pr, i)]) + groups.append([(pr, i, lab)]) # labels in two rows above the plot, each with a guide down to its dot placed = [] for g in groups: i = g[-1][1] x, y = X(i), Y(rel[i]) - for pr, k in g: + for pr, k, lab in g: b.append('#%s: %s' % (X(k), Y(rel[k]), pr, fx(rel[k]))) - text = ", ".join("#%s" % pr for pr, _ in g) - w = 7.2 * len(text) + marks = list(dict.fromkeys(lab for _, _, lab in g)) + w = 18 * len(marks) - 3 tx = min(max(x, L + w / 2), R - w / 2) row = 0 while any(r == row and abs(tx - px) < (w + pw) / 2 + 4 for px, r, pw in placed): row += 1 placed.append((tx, row, w)) - ty = 50 - 13 * row - b.append('' % (x, ty + 4, x, y - 5)) - b.append('%s' % (tx, ty, text)) + ty = 46 - 18 * row # the center of the badges + b.append('' % (x, ty + 8, x, y - 5)) + for k, mark in enumerate(marks): + cx = tx - w / 2 + 7.5 + 18 * k + b.append('' % ("" if mark.isdigit() else " nj-theme-dot--other", cx, ty)) + b.append('%s' % (cx, ty + 4, mark)) b.append('' % (L, B, R, B)) b.append('speedup over 3.12.0 (log scale), more is better' % (8, H - 8)) final = rel[-1] - desc = ("%s: speedup over 3.12.0 at each of %d commits, ending at %s. Labeled steps: %s." - % (title, n, fx(final).replace(TIMES, "x"), ", ".join("#%s" % p for p in labels))) + desc = ("%s: speedup over 3.12.0 at each of %d commits, ending at %s. Labeled steps, by theme: %s." + % (title, n, fx(final).replace(TIMES, "x"), ", ".join(lab for _, lab in labels))) write("perf_blog_timeline_%s.svg" % col, W, H, "nj-charts--timeline", "nj-blog-tl-" + col, "%s: speedup over 3.12.0 by commit" % title, desc, b) @@ -266,8 +315,8 @@ CLIFFS = [ ("diff() 64k numbers vs []", 4102, 9.98), ("diff() 20k objects vs half", 119, 3.85), ("parse() callback, 32k objects", 1334, 11.5), - ("< nested 24 deep", 62.6, 0.002), - ("< citm, 10x", 274, 3.81), + ("operator< nested 24 deep", 62.6, 0.002), + ("operator< citm, 10x", 274, 3.81), ("flatten() citm, ordered_json", 253, 1.37), ("to_bson() 200 deep, 100x", 19.5, 0.566), ("push_back() 100k, diagnostics", 1514, 4.98), @@ -306,84 +355,282 @@ def cliffs(): "Dot plot on a logarithmic time axis, less is better; an arrow leads from each 3.12.0 time to the 3.13.0 time. " + "; ".join(desc) + ".", b) -# ---------- json_view: parse throughput ---------- -# engines and GB/s per file, copied from the table in "Build a different data structure" -VIEW_FILES = ["twitter.json", "citm_catalog.json", "canada.json", "jeopardy.json"] -VIEW_BYTES = [631514, 1727204, 2251051, 55554625] -VIEW_US = [ # (engine, css class, [µs per file]), fresh documents, from the table in "How it compares" - ("nlohmann/json json_document", "nj-charts-c1", [183, 364, 943, 22681]), - ("yyjson", "nj-charts-c2", [194, 478, 1489, 30342]), - ("simdjson DOM", "nj-charts-c3", [202, 486, 2097, 26904]), - ("sonic-rs (Rust)", "nj-charts-c4", [302, 664, 1907, 30202]), - ("sonic-cpp", "nj-charts-c5", [379, 986, 2580, 40804]), - ("Boost.JSON", "nj-charts-c6", [868, 1483, 2481, 88925]), - ("nlohmann/json json::parse", "nj-charts-c1 nj-charts-dim", [1352, 2386, 5915, 163750]), +# ---------- the price: compile time of two programs against 3.12.0 ---------- +# CPU time of the compiler in ms, median of 9 interleaved rounds, C++20, M1 Max (the post's appendix G) +# (3.12.0, 3.13.0, 3.13.0 with a precompiled header, 3.13.0 as a module) +PRICE = [ + ("Apple clang 21, -O0 (debug)", [("count_numbers", 959.1, 1155.3, 679.1, 803.9), ("server_config", 1108.2, 1445.1, 763.1, 1057.0)]), + ("Apple clang 21, -O2", [("count_numbers", 1268.8, 1867.7, 1364.3, 1512.9), ("server_config", 1576.9, 2353.6, 1749.4, 2141.4)]), + ("GCC 16, -O0 (debug)", [("count_numbers", 1443.7, 2346.4, 1579.2, 1662.5), ("server_config", 1984.8, 2781.7, 2113.3, 2181.1)]), + ("GCC 16, -O2", [("count_numbers", 2326.9, 3453.3, 2972.4, 2895.3), ("server_config", 2888.7, 4388.6, 3941.8, 3825.5)]), ] -VIEW = [(e, c, [n / (t * 1000) for n, t in zip(VIEW_BYTES, us)]) for e, c, us in VIEW_US] # GB/s -# dump: the bytes of the compact output, and the same engines, from the dump table in "How it compares" -DUMP_BYTES = [466906, 500299, 2090234, 52508728] -DUMP_US = [ - ("nlohmann/json json_document", "nj-charts-c1", [74.5, 132.8, 1625.1, 14757.2]), - ("yyjson", "nj-charts-c2", [104.2, 165.7, 1715.7, 20133.5]), - ("simdjson DOM", "nj-charts-c3", [354.2, 498.2, 6816.1, 54833.4]), - ("sonic-rs (Rust)", "nj-charts-c4", [212.6, 443.9, 2416.8, 33818.5]), - ("sonic-cpp", "nj-charts-c5", [104.6, 222.3, 3044.2, 19836.1]), - ("Boost.JSON", "nj-charts-c6", [497.6, 501.4, 2941.8, 63392.3]), - ("nlohmann/json json::dump", "nj-charts-c1 nj-charts-dim", [216.7, 285.5, 2244.0, 31205.3]), -] -DUMP = [(e, c, [n / (t * 1000) for n, t in zip(DUMP_BYTES, us)]) for e, c, us in DUMP_US] # GB/s +PRICE_SERIES = [("3.13.0", "nj-charts-c2"), ("3.13.0, precompiled header", "nj-charts-c1"), ("3.13.0, module", "nj-charts-c3")] -def view(VIEW=VIEW, name="perf_blog_view.svg", tid="nj-blog-view", - title="Parse throughput of nlohmann/json's json_document and json::parse and five other document parsers, fresh documents, Apple M1 Max", - what="parse"): - W, L, R = 580, 142, 545 - hi = max(max(v) for _, _, v in VIEW) - hi = math.ceil(hi * 2) / 2 - X = lambda v: L + v / hi * (R - L) - bh, gap = 9, 2 - group_h = len(VIEW) * (bh + gap) + 14 +def price(): + W, L, R = 600, 150, 560 + lo, hi = -50, 70 + X = lambda pct: L + (pct - lo) / (hi - lo) * (R - L) + pct = lambda new, old: round((new / old - 1) * 100) + lab = lambda p: (MINUS + "%d %%" % -p) if p < 0 else "+%d %%" % p + bh, pitch, gap = 11, 14, 10 b, desc = [], [] - x, ly = 8, 10 - for j, (eng, cls, _) in enumerate(VIEW): - w = 18 + 7.4 * len(eng) + 16 - if x + w > W: - x, ly = 8, ly + 20 - b.append('' % (cls, x, ly)) - b.append('%s' % (x + 18, ly + 10.5, esc(eng))) - x += w - top = ly + 34 # below the last row of the legend - axis_y = top + group_h * len(VIEW_FILES) - t = 0.5 - while t <= hi + 1e-9: - b.append('' % (X(t), top - 4, X(t), axis_y)) - b.append('%g' % (X(t), axis_y + 16, t)) - t += 0.5 - b.append('GB/s, more is better' % ((L + R) / 2, axis_y + 34)) - for i, f in enumerate(VIEW_FILES): - y0 = top + i * group_h - b.append('%s' % (L - 8, y0 + group_h / 2, esc(f))) - for j, (eng, cls, vals) in enumerate(VIEW): - y = y0 + j * (bh + gap) - b.append('%s, %s: %.2f GB/s' % (cls, hbar(X(0), X(vals[i]), y, bh), esc(eng), esc(f), vals[i])) - b.append('%.2f' % (X(vals[i]) + 4, y + bh - 1.5, vals[i])) - desc.append("%s %s %.2f GB/s" % (f, eng, vals[i])) - b.append('' % (X(0), top - 4, X(0), axis_y)) - write(name, W, axis_y + 44, "nj-charts--blog", tid, title, - "Grouped horizontal bars of %s throughput in GB/s, more is better. " % what + "; ".join(desc) + ".", b) + # the key above the plot + x = 8 + for name, cls in PRICE_SERIES: + b.append('' % (cls, x)) + b.append('%s' % (x + 18, esc(name))) + x += 18 + 8.2 * len(name) + 22 + top = 54 + b.append('as fast as 3.12.0' % (X(0), top - 8)) + y = top + for build, progs in PRICE: + b.append('%s' % (y + 14, esc(build))) + y += 24 + y0, at = y, len(b) + for prog, old, *new in progs: + b.append('%s' + % (L - 8, y + 1.5 * pitch + 2, prog)) + for (name, cls), t in zip(PRICE_SERIES, new): + p = pct(t, old) + b.append('%s, %s, %s: %s ms against %s ms with 3.12.0 (%s)' + % (cls, hbar(X(0), X(p), y, bh), prog, esc(build), esc(name), format(round(t), ","), format(round(old), ","), lab(p))) + if p < 0: + b.append('%s' % (X(p) - 5, y + bh - 1.5, lab(p))) + else: + b.append('%s' % (X(p) + 5, y + bh - 1.5, lab(p))) + desc.append("%s, %s, %s: %s" % (build, prog, name, lab(p).replace(MINUS, "-"))) + y += pitch + y += gap - (pitch - bh) + # the grid behind this panel's bars only, so that it doesn't cross the panel titles + b[at:at] = ['' % (X(t), y0 - 4, X(t), y - gap + 4) + for t in range(lo + 10, hi + 1, 20) if t] + y += 8 + axis_y = y + b.append('' % (X(0), top - 2, X(0), axis_y)) + for t in range(lo + 10, hi + 1, 20): + b.append('%s' % (X(t), axis_y + 16, "0" if t == 0 else lab(t))) + b.append('compile time compared with 3.12.0, less is better' % ((L + R) / 2, axis_y + 34)) + write("perf_blog_price.svg", W, axis_y + 44, "nj-charts--blog", "nj-blog-price", + "Compile time of two programs with 3.13.0, alone, with a precompiled header and as a module, compared with 3.12.0", + "Horizontal bars of the change in compile time against 3.12.0, less is better. " + "; ".join(desc) + ".", b) + + +# ---------- use cases: libraries x use cases, relative time ---------- +# data/perf_usecases_.json is written by tests/benchmarks/json_view/others/summarize.py --json +UC_FILES = ["twitter", "citm_catalog", "canada", "jeopardy"] +USE_CASES = [("validate", "validate"), ("sum", "sum"), ("select", "select"), + ("edit", "edit"), ("minify", "minify"), ("write", "write")] +UC_LIBS = { # library in the JSON -> row label + "nlohmann json_document": "nlohmann/json json_document", "nlohmann json": "nlohmann/json json", + "yyjson": "yyjson", "simdjson": "simdjson", "sonic-cpp": "sonic-cpp", "Glaze": "Glaze", "Boost.JSON": "Boost.JSON", + "RapidJSON": "RapidJSON", "sonic-rs": "sonic-rs (Rust)", "simd-json": "simd-json (Rust)", "serde_json": "serde_json (Rust)", +} +UC_PLATFORMS = [("mac", "Use cases: time of each library relative to the fastest, Apple M1 Max"), + ("x86-gcc", "Use cases: time of each library relative to the fastest, x86-64 with GCC 16.2"), + ("x86-gcc13", "Use cases: time of each library relative to the fastest, x86-64 with GCC 13"), + ("x86-clang", "Use cases: time of each library relative to the fastest, x86-64 with Clang 23")] +LEVEL_MARK = {"no UTF-8": "U", "partial": "P", "full": ""} +# why a cell is empty (the tooltips of the n/a cells) +NA = {("simdjson", "edit"): "simdjson's documents are read-only: it has no API to change a value and write the result"} + + +def geomean(xs): + return math.exp(sum(math.log(x) for x in xs) / len(xs)) + + +def normalize_usecases(data): + """Chooses each library's best variants again with the rules of the post: variants that copy each number's text + instead of formatting it (json_document's number_format::source, RapidJSON's raw numbers) and variants that reuse + a parser or document across calls are measured but not chosen""" + data = json.loads(json.dumps(data)) + rank = {"full": 0, "n/a": 0, "no UTF-8": 1, "partial": 2} + for files in data.values(): + for cell in files.values(): + for e in cell.values(): + vs = [(v["us"], k, v["level"]) for k, v in e["variants"].items() + if not any(w in k for w in ("source numbers", "raw numbers", "reused"))] + full = [v for v in vs if rank[v[2]] == 0] + pick = lambda v: {"us": v[0], "variant": v[1], "level": "full" if rank[v[2]] == 0 else v[2]} + e["best"] = pick(min(full)) if full else None + e["best_any"] = pick(min(vs)) + return data + + +FILE_NAMES = {"twitter": "twitter.json", "citm_catalog": "citm_catalog.json", "canada": "canada.json", + "jeopardy": "jeopardy.json"} +# what a variant that checks less skips, worded as the trade it is (the tooltips of the heatmaps) +CHECKS_LESS = [ + ("simdjson", "On-Demand", "reads lazily: On-Demand reads only what you ask for and steps over the rest by matching brackets"), + ("simdjson", "minify", "simdjson::minify() only removes whitespace, without parsing the values"), + ("Glaze", "lazy_json", "reads lazily: lazy_json reads only what you ask for and steps over the rest"), + ("Glaze", "minify_json", "minify_json only removes whitespace, without parsing the values"), + ("Glaze", "structs", "reads into structs and steps over fields it doesn't know without checking them " + "(validate_skipped checks them too)"), + ("RapidJSON", "", "trusts UTF-8: RapidJSON's default (kParseValidateEncodingFlag checks it)"), + ("sonic-cpp", "", "trusts UTF-8: sonic-cpp 1.0.2 doesn't check it"), + ("serde_json", "", "trusts UTF-8 in the strings it skips (from_slice); strings it reads are checked"), +] + + +def checks_less(lib, variant): + for l, v, text in CHECKS_LESS: + if l == lib and v in variant: + return text + return "checks less" + + +def usecase_table(data): + """{library: {use case: cell}}: per library the geometric mean over UC_FILES of its fastest fully validating time + ("full") and of its fastest time at any level ("alt", only if it is at least 3 % faster), each divided by the best + such fully validating mean in the use case, so that every file counts equally and the fastest library is 1.00""" + out = {} + data = normalize_usecases(data) + for uc, _ in USE_CASES: + files = data.get(uc, {}) + if not files: + continue + cells = {} + for lib in UC_LIBS: + es = [files.get(f, {}).get(lib) for f in UC_FILES] + if not all(es): + continue + full = [e["best"] for e in es] + alt = [e["best_any"] for e in es] + cells[lib] = {"full": geomean([b["us"] for b in full]) if all(full) else None, "alt": geomean([a["us"] for a in alt]), + "files": [(f, b, a) for f, b, a in zip(UC_FILES, full, alt)]} + ref = min(c["full"] for c in cells.values() if c["full"]) + for lib, c in cells.items(): + full = c["full"] / ref if c["full"] else None + alt = c["alt"] / ref + if full is not None and alt > full * 0.97: + alt = None + levels = {a["level"] for _, _, a in c["files"]} if alt is not None else set() + level = "partial" if "partial" in levels else "no UTF-8" if "no UTF-8" in levels else "full" + out.setdefault(lib, {})[uc] = {"full": full, "alt": alt, "level": level, "files": c["files"]} + return out + + +# cell colors: green for the fastest, gray around twice the time, red for the slowest; the upper bounds of the steps +HEAT_STEPS = [1.15, 1.5, 2.5, 5, float("inf")] +HEAT_LABELS = ["below 1.15", "1.15 to 1.5", "1.5 to 2.5", "2.5 to 5", "5 and more"] + + +def heat(r): + return next(i for i, b in enumerate(HEAT_STEPS) if r < b) + + +def fr(r): + return "%.2f" % r if r < 9.995 else "%.1f" % r if r < 99.95 else "%.0f" % r + + +def fus(us): + return "{:,.0f} µs".format(us) if us >= 100 else "%.1f µs" % us + + +def tip(lib, uc_label, c, half): + """the tooltip of a cell: lines separated by newlines ( in the attribute), the first one the heading""" + if half == "full": + lines = ["%s · %s" % (UC_LIBS[lib], uc_label), + "%s× the time of the fastest library (fully validating)" % fr(c["full"])] + picks = [(f, b) for f, b, _ in c["files"]] + else: + lines = ["%s · %s, checking less" % (UC_LIBS[lib], uc_label), + "%s× the time of the fastest fully validating library" % fr(c["alt"])] + picks = [(f, a) for f, _, a in c["files"]] + ways = sorted({e["variant"] for _, e in picks}) + if len(ways) == 1: + lines.append("way: %s" % ways[0]) + for f, e in picks: + lines.append("%s: %s%s%s" % (FILE_NAMES[f], fus(e["us"]), "" if len(ways) == 1 else " · " + e["variant"], + " (validates fully)" if half == "alt" and e["level"] == "full" else "")) + if half == "alt": + seen = [] + for _, e in picks: + if e["level"] != "full": + t = checks_less(lib, e["variant"]) + if t not in seen: + seen.append(t) + lines += seen + if any("(copy)" in e["variant"] for _, e in picks): + lines.append("(copy): parses in place, on a copy of the input that is part of the time") + return " ".join(lines) + + +def heatmap(platform, title): + data = json.load((HERE / "data" / ("perf_usecases_%s.json" % platform)).open()) + t = usecase_table(data) + libs = [l for l in UC_LIBS if l in t] + score = lambda l: geomean([v["full"] if v["full"] else v["alt"] * 1.5 for v in t[l].values()]) + libs.sort(key=score) + W, L, cw, ch, top = 784, 224, 92, 36, 44 + b, desc = [], [] + for j, (uc, label) in enumerate(USE_CASES): + b.append('%s' % (L + j * cw + cw / 2, top - 10, esc(label))) + for i, lib in enumerate(libs): + y = top + i * ch + cls = "nj-charts-name-json" if lib.startswith("nlohmann") else "" + b.append('%s' % (cls, L - 8, y + ch / 2 + 4, esc(UC_LIBS[lib]))) + for j, (uc, label) in enumerate(USE_CASES): + x = L + j * cw + c = t[lib].get(uc) + if c is None: + b.append('' % esc("%s · %s %s" % (UC_LIBS[lib], label, NA.get((lib, uc), "the library has no API for this use case")))) + b.append('' % (x + 1, y + 1, cw - 2, ch - 2)) + b.append('n/a' % (x + cw / 2, y + ch / 2 + 4)) + b.append('') + desc.append("%s %s: n/a" % (UC_LIBS[lib], label)) + continue + halves = [] + if c["full"] is not None: + halves.append(("full", c["full"])) + if c["alt"] is not None: + halves.append(("alt", c["alt"])) + hw = (cw - 2) / len(halves) + for k, (half, r) in enumerate(halves): + hx = x + 1 + k * hw + gap = 1 if len(halves) == 2 else 0 + b.append('' % esc(tip(lib, label, c, half))) + b.append('' + % (heat(r), hx + (gap if k else 0), y + 1, hw - gap, ch - 2)) + cx = hx + hw / 2 + if half == "alt": + b.append('%s' % (cx, y + 16, fr(r))) + b.append('%s' + % (cx, y + 29, LEVEL_MARK[c["level"]])) + else: + b.append('%s' % (cx, y + ch / 2 + 4, fr(r))) + b.append('') + if c["full"] is None: # no fully validating way: the left half stays empty + pass + desc.append("%s %s: %s%s" % (UC_LIBS[lib], label, fr(c["full"]) if c["full"] else "no fully validating way", + (" (%s checking less, %s)" % (fr(c["alt"]), c["level"])) if c["alt"] else "")) + # the key, set apart from the grid and narrower than its columns, so that it doesn't read as a row of it + yb = top + len(libs) * ch + 28 + b.append('time relative to the fastest fully validating library, less is better' % (yb + 4)) + kw, ky = 76, yb + 14 + for i, lab in enumerate(HEAT_LABELS): + # each swatch in its own group, so that the ink rule for the strong steps (a sibling selector) stays inside it + b.append('' % (i, 8 + i * (kw + 4), ky, kw)) + b.append('%s' % (8 + i * (kw + 4) + kw / 2, ky + 14, esc(lab))) + nx = 8 + len(HEAT_LABELS) * (kw + 4) + 12 + b.append('' % (nx, ky, 40)) + b.append('n/a' % (nx + 20, ky + 14)) + b.append('no API for it' % (nx + 48, ky + 14)) + write("perf_blog_usecases_%s.svg" % platform, W, ky + 28, "nj-charts--blog nj-charts--heat", "nj-blog-uc-" + platform, title, + "Table of relative times, libraries by use case. " + "; ".join(desc) + ".", b) if __name__ == "__main__": swar() if OVERVIEW: overview() + distribution() if TIMELINE: timeline() if CLIFFS: cliffs() - if VIEW: - view() - if DUMP: - view(DUMP, "perf_blog_view_dump.svg", "nj-blog-view-dump", - "Write throughput of nlohmann/json's json_document and json, and five other libraries, each writing a " - "document parsed beforehand, Apple M1 Max", "write") + price() + for platform, title in UC_PLATFORMS: + if (HERE / "data" / ("perf_usecases_%s.json" % platform)).exists(): + heatmap(platform, title) diff --git a/docs/mkdocs/scripts/figures/perf_blog_tables.py b/docs/mkdocs/scripts/figures/perf_blog_tables.py new file mode 100644 index 000000000..1fc9b71fe --- /dev/null +++ b/docs/mkdocs/scripts/figures/perf_blog_tables.py @@ -0,0 +1,67 @@ +"""Prints the tables of Appendix E of home/blog/how_3_13_0_got_faster.md (comparison with other libraries) as Markdown, +from data/perf_usecases_.json, which tests/benchmarks/json_view/others/summarize.py --json writes. + +Usage: python3 scripts/figures/perf_blog_tables.py [title] +""" +import json +import sys +from pathlib import Path + +from perf_blog import normalize_usecases + +HERE = Path(__file__).resolve().parent +FILES = [("twitter", "`twitter.json`"), ("citm_catalog", "`citm_catalog.json`"), ("canada", "`canada.json`"), + ("jeopardy", "`jeopardy.json`"), ("status", "one status (2.5 KB)")] +USE_CASES = [("validate", "validate"), ("sum", "sum"), ("select", "select"), ("edit", "edit"), ("minify", "minify"), + ("write", "write")] +NAMES = {"nlohmann json_document": "nlohmann/json `json_document`", "nlohmann json": "nlohmann/json `json`", + "sonic-rs": "sonic-rs (Rust)", "simd-json": "simd-json (Rust)", "serde_json": "serde_json (Rust)"} +MARK = {"no UTF-8": "U", "partial": "P"} + + +def fmt(us): + if us >= 10000: + return "{:,.0f}".format(us) + if us >= 100: + return "{:,.0f}".format(us) + return "%.1f" % us + + +def table(data, uc, indent): + files = [f for f, _ in FILES if f in data.get(uc, {})] + libs = list(data[uc][files[0]].keys()) + jd = lambda f: data[uc][f]["nlohmann json_document"]["best"]["us"] + libs.sort(key=lambda l: sum(((data[uc][f][l]["best"] or data[uc][f][l]["best_any"])["us"] / jd(f)) for f in files)) + head = "| library | variant | " + " | ".join(n for f, n in FILES if f in files) + " |" + rows = [head, "| --- | --- | " + " | ".join("--:" for _ in files) + " |"] + for lib in libs: + best = [data[uc][f][lib]["best"] for f in files] + anyv = [data[uc][f][lib]["best_any"] for f in files] + names = sorted({b["variant"] for b in best if b} | {a["variant"] + " [%s]" % MARK[a["level"]] for b, a in zip(best, anyv) if a["level"] in MARK and (not b or a["us"] < b["us"])}) + cells = [] + for b, a in zip(best, anyv): + c = fmt(b["us"]) if b else "–" + if a["level"] in MARK and (not b or a["us"] < b["us"] * 0.97): + c += " (%s %s)" % (MARK[a["level"]], fmt(a["us"])) + cells.append(c) + bold = "**%s**" if lib == "nlohmann json_document" else "%s" + rows.append("| %s | %s | %s |" % (bold % NAMES.get(lib, lib), ", ".join(names), " | ".join(cells))) + return "\n".join(indent + r for r in rows) + + +def main(): + platform = sys.argv[1] + data = json.load((HERE / "data" / ("perf_usecases_%s.json" % platform)).open()) + data = normalize_usecases(data) # the same choices as the figure + out = [] + for uc, label in USE_CASES: + if uc not in data: + continue + out.append("**%s**\n" % label) + out.append(table(data, uc, "")) + out.append("") + print("\n".join(out)) + + +if __name__ == "__main__": + main()