From 5cbec344fe99d9141f023274c5f90f80201c4eab Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Fri, 30 Oct 2026 17:33:12 +0100 Subject: [PATCH] docs: measure the 3.13.0 post against develop with #5964 and #5908 The suite (Appendix B, the short-version table, the overview and distribution figures) and the timeline endpoint now measure develop d20c4dcd89 with #5964 and #5908 merged. The geometric mean stays 2.9x (2.95); Dump/signed_ints and Dump/unsigned_ints gain 1.5x and 2.1x from #5964; GetVectorDouble/floats drops from 10.3x to 7.0x because the old candidate's suite binary happened to compile that loop faster (a standalone build takes 0.97 ms with both headers). The timeline endpoint is the 10-27 value scaled by the ratio of the new to the old candidate, both measured on 10-30, so that it stays comparable with the other points of the timeline. Signed-off-by: Niels Lohmann --- .../docs/home/blog/how_3_13_0_got_faster.md | 413 +++++++++--------- .../docs/images/perf_blog_distribution.svg | 26 +- .../mkdocs/docs/images/perf_blog_overview.svg | 70 +-- .../perf_blog_timeline_accept_twitter.svg | 4 +- .../images/perf_blog_timeline_dump_canada.svg | 2 +- .../perf_blog_timeline_dump_twitter.svg | 4 +- .../perf_blog_timeline_from_cbor_twitter.svg | 2 +- .../perf_blog_timeline_parse_canada.svg | 2 +- ...f_blog_timeline_parse_twitter_ifstream.svg | 2 +- .../perf_blog_timeline_to_cbor_twitter.svg | 4 +- .../scripts/figures/data/perf_suite.csv | 364 +++++++-------- .../scripts/figures/data/perf_timeline.csv | 2 +- docs/mkdocs/scripts/figures/perf_blog.py | 34 +- 13 files changed, 466 insertions(+), 463 deletions(-) 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 1f70449b7..7833ec30c 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 @@ -4,7 +4,9 @@ + comparison). Also refresh the line counts and the compile times in "The price". The numbers below are from the release candidate: develop d20c4dcd89 with #5964 and #5908 merged (suite and + timeline endpoint rerun 10-30; the comparison with other libraries was measured with the same code for these + paths, except #5964's integer writing). --> Since 2016, the [README](https://github.com/nlohmann/json#readme) of this library has said this about speed: @@ -58,9 +60,9 @@ The rows above are chosen to show the range. All 182 benchmarks of the suite: --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).

+

How many of the suite's 182 benchmarks got how much faster. The one below 1× is copying `citm_catalog.json` without destroying the copy. 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 +The median benchmark got 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: @@ -1437,24 +1439,24 @@ 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× | +| `json::parse()` of `twitter.json` | 3.26 ms | 1.06 ms | 3.1× | +| `json::parse()` of `citm_catalog.json` | 7.42 ms | 1.77 ms | 4.2× | +| `json::parse()` of `canada.json` | 15.2 ms | 4.5 ms | 3.4× | +| `json::parse()` of `canada.json`, indented by 4 spaces | 34.4 ms | 5.16 ms | 6.7× | +| `ordered_json::parse()` of `citm_catalog.json` | 11.3 ms | 1.67 ms | 6.8× | +| `json::parse()` of `twitter.json` from an `std::ifstream` | 3.45 ms | 1.41 ms | 2.4× | +| `json::parse()` of `citm_catalog.json` from a `FILE*` | 35.5 ms | 7.58 ms | 4.7× | +| `json::accept()` of `citm_catalog.json` | 6.46 ms | 0.934 ms | 6.9× | +| `dump()` of `twitter.json` | 1.42 ms | 0.211 ms | 6.7× | +| `dump()` of `canada.json` | 6.84 ms | 2.35 ms | 2.9× | +| `dump(4)` of `citm_catalog.json` | 1.97 ms | 0.421 ms | 4.7× | +| `to_cbor()` of `twitter.json` | 0.645 ms | 0.145 ms | 4.5× | +| `from_cbor()` of `twitter.json` from memory | 3.16 ms | 0.983 ms | 3.2× | +| `from_cbor()` of `twitter.json` from a `FILE*` | 10.2 ms | 1.60 ms | 6.4× | +| `diff()` of `canada.json` with every eighth scalar changed | 39.4 ms | 3.76 ms | 10.5× | +| iterating over every value of `canada.json` | 0.887 ms | 0.314 ms | 2.8× | +| copying `citm_catalog.json` and destroying the copy | 1.67 ms | 1.50 ms | 1.11× | +| `==` of `citm_catalog.json` and a copy | 0.278 ms | 0.260 ms | 1.07× |

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).

@@ -1462,188 +1464,188 @@ The rows of the first chart: | 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× | + | `Accept/canada` | 12.9 ms | 2.33 ms | 5.51× | + | `Accept/citm_catalog` | 6.46 ms | 934 µs | 6.92× | + | `Accept/floats` | 114 ms | 24.7 ms | 4.62× | + | `Accept/jeopardy` | 219 ms | 64.9 ms | 3.37× | + | `Accept/signed_ints` | 117 ms | 29 ms | 4.03× | + | `Accept/small_signed_ints` | 57 ms | 19.3 ms | 2.96× | + | `Accept/twitter` | 2.5 ms | 476 µs | 5.25× | + | `Accept/unsigned_ints` | 116 ms | 28.2 ms | 4.11× | + | `BinaryToCbor/1024` | 294 ns | 107 ns | 2.75× | + | `BinaryToCbor/128` | 255 ns | 116 ns | 2.19× | + | `BinaryToCbor/16384` | 957 ns | 410 ns | 2.34× | + | `BinaryToCbor/16` | 248 ns | 49.3 ns | 5.02× | + | `BinaryToCbor/2048` | 332 ns | 127 ns | 2.62× | + | `BinaryToCbor/256` | 271 ns | 91.5 ns | 2.97× | + | `BinaryToCbor/32768` | 1.55 µs | 819 ns | 1.89× | + | `BinaryToCbor/32` | 258 ns | 50.1 ns | 5.14× | + | `BinaryToCbor/4096` | 408 ns | 177 ns | 2.30× | + | `BinaryToCbor/512` | 287 ns | 102 ns | 2.81× | + | `BinaryToCbor/64` | 256 ns | 82.9 ns | 3.09× | + | `BinaryToCbor/8192` | 521 ns | 262 ns | 1.99× | + | `BinaryToCbor/8` | 251 ns | 49 ns | 5.11× | + | `Copy/canada` | 3.76 ms | 2.9 ms | 1.30× | + | `Copy/citm_catalog` | 1.67 ms | 1.50 ms | 1.11× | + | `Copy/twitter` | 817 µs | 748 µs | 1.09× | + | `CopyAssign/canada` | 3.83 ms | 3 ms | 1.27× | + | `CopyAssign/citm_catalog` | 1.75 ms | 1.59 ms | 1.10× | + | `CopyAssign/twitter` | 887 µs | 759 µs | 1.17× | + | `CopyOnly/canada` | 1.58 ms | 1.55 ms | 1.02× | + | `CopyOnly/citm_catalog` | 773 µs | 805 µs | 0.96× | + | `CopyOnly/twitter` | 421 µs | 413 µs | 1.02× | + | `CopyRing/canada` | 3.85 ms | 2.98 ms | 1.29× | + | `CopyRing/citm_catalog` | 1.82 ms | 1.59 ms | 1.15× | + | `CopyRing/twitter` | 923 µs | 837 µs | 1.10× | + | `DestroyOnly/canada` | 2.19 ms | 1.4 ms | 1.56× | + | `DestroyOnly/citm_catalog` | 896 µs | 687 µs | 1.30× | + | `DestroyOnly/twitter` | 416 µs | 327 µs | 1.27× | + | `Diff/canada` | 39.4 ms | 3.76 ms | 10.5× | + | `Diff/citm_catalog` | 7.13 ms | 1.11 ms | 6.44× | + | `Diff/twitter` | 4.95 ms | 655 µs | 7.55× | + | `Dump/canada / -` | 6.84 ms | 2.35 ms | 2.91× | + | `Dump/canada / 4` | 9.03 ms | 3.06 ms | 2.95× | + | `Dump/citm_catalog / -` | 1.41 ms | 297 µs | 4.76× | + | `Dump/citm_catalog / 4` | 1.97 ms | 421 µs | 4.67× | + | `Dump/floats / -` | 64.1 ms | 24 ms | 2.67× | + | `Dump/floats / 4` | 72.1 ms | 24.7 ms | 2.92× | + | `Dump/jeopardy / -` | 205 ms | 32 ms | 6.39× | + | `Dump/jeopardy / 4` | 224 ms | 35.8 ms | 6.24× | + | `Dump/signed_ints / -` | 24 ms | 10.7 ms | 2.23× | + | `Dump/signed_ints / 4` | 32.3 ms | 11.4 ms | 2.83× | + | `Dump/small_signed_ints / -` | 18 ms | 8.03 ms | 2.24× | + | `Dump/small_signed_ints / 4` | 25.2 ms | 8.84 ms | 2.86× | + | `Dump/twitter / -` | 1.42 ms | 211 µs | 6.73× | + | `Dump/twitter / 4` | 1.62 ms | 253 µs | 6.42× | + | `Dump/unsigned_ints / -` | 23.7 ms | 8.12 ms | 2.92× | + | `Dump/unsigned_ints / 4` | 31.9 ms | 8.52 ms | 3.75× | + | `Equal/canada` | 470 µs | 342 µs | 1.37× | + | `Equal/citm_catalog` | 278 µs | 260 µs | 1.07× | + | `Equal/twitter` | 145 µs | 130 µs | 1.11× | + | `Flatten/canada` | 29.2 ms | 11.3 ms | 2.58× | + | `Flatten/citm_catalog` | 6.65 ms | 3.02 ms | 2.20× | + | `Flatten/twitter` | 3.64 ms | 2.09 ms | 1.74× | + | `FlattenOrdered/citm_catalog` | 257 ms | 1.43 ms | 179× | + | `FlattenOrdered/twitter` | 51.1 ms | 878 µs | 58.3× | + | `FromBinaryBuffer/bjdata / canada` | 8.45 ms | 4.18 ms | 2.02× | + | `FromBinaryBuffer/bjdata / twitter` | 3.27 ms | 974 µs | 3.36× | + | `FromBinaryBuffer/bjdata_optimized / canada` | 8.84 ms | 2.93 ms | 3.02× | + | `FromBinaryBuffer/bjdata_optimized / twitter` | 3.22 ms | 972 µs | 3.31× | + | `FromBinaryBuffer/bson / canada` | 9.59 ms | 5.46 ms | 1.76× | + | `FromBinaryBuffer/bson / citm_catalog` | 4.01 ms | 1.77 ms | 2.26× | + | `FromBinaryBuffer/bson / twitter` | 3.2 ms | 1.02 ms | 3.14× | + | `FromBinaryBuffer/cbor / canada` | 8.5 ms | 2.34 ms | 3.63× | + | `FromBinaryBuffer/cbor / citm_catalog` | 3.84 ms | 1.48 ms | 2.58× | + | `FromBinaryBuffer/cbor / floats` | 29.4 ms | 8.37 ms | 3.51× | + | `FromBinaryBuffer/cbor / jeopardy` | 370 ms | 119 ms | 3.10× | + | `FromBinaryBuffer/cbor / signed_ints` | 36.4 ms | 13.2 ms | 2.75× | + | `FromBinaryBuffer/cbor / twitter` | 3.16 ms | 983 µs | 3.21× | + | `FromBinaryBuffer/msgpack / canada` | 8.59 ms | 2.37 ms | 3.62× | + | `FromBinaryBuffer/msgpack / citm_catalog` | 3.83 ms | 1.44 ms | 2.66× | + | `FromBinaryBuffer/msgpack / jeopardy` | 362 ms | 112 ms | 3.23× | + | `FromBinaryBuffer/msgpack / twitter` | 3.13 ms | 956 µs | 3.28× | + | `FromBinaryBuffer/ubjson / canada` | 8.43 ms | 4.2 ms | 2.01× | + | `FromBinaryBuffer/ubjson / citm_catalog` | 3.95 ms | 1.77 ms | 2.23× | + | `FromBinaryBuffer/ubjson / jeopardy` | 373 ms | 117 ms | 3.18× | + | `FromBinaryBuffer/ubjson / twitter` | 3.28 ms | 973 µs | 3.37× | + | `FromBinaryBuffer/ubjson_optimized / canada` | 8.65 ms | 2.86 ms | 3.03× | + | `FromBinaryBuffer/ubjson_optimized / twitter` | 3.22 ms | 976 µs | 3.30× | + | `FromBinaryFile/bjdata / twitter` | 10.8 ms | 1.98 ms | 5.43× | + | `FromBinaryFile/bson / twitter` | 10.6 ms | 1.83 ms | 5.76× | + | `FromBinaryFile/cbor / canada` | 14.6 ms | 4.52 ms | 3.23× | + | `FromBinaryFile/cbor / twitter` | 10.2 ms | 1.6 ms | 6.38× | + | `FromBinaryFile/ubjson / canada` | 13.9 ms | 6.5 ms | 2.15× | + | `FromBinaryFile/ubjson / twitter` | 10.8 ms | 1.97 ms | 5.49× | + | `FromBinaryShape/containers / bjdata` | 14.3 ms | 7.41 ms | 1.94× | + | `FromBinaryShape/containers / bson` | 17.1 ms | 10 ms | 1.70× | + | `FromBinaryShape/containers / cbor` | 14.4 ms | 4 ms | 3.59× | + | `FromBinaryShape/containers / msgpack` | 14.3 ms | 3.9 ms | 3.66× | + | `FromBinaryShape/containers / ubjson_optimized` | 15.1 ms | 4.92 ms | 3.07× | + | `FromBinaryShape/containers / ubjson` | 14.5 ms | 7.34 ms | 1.97× | + | `FromBinaryShape/nested / bjdata` | 97.4 µs | 39 µs | 2.50× | + | `FromBinaryShape/nested / bson` | 104 µs | 47.6 µs | 2.18× | + | `FromBinaryShape/nested / cbor` | 94.1 µs | 35.4 µs | 2.66× | + | `FromBinaryShape/nested / msgpack` | 94.1 µs | 35.2 µs | 2.67× | + | `FromBinaryShape/nested / ubjson` | 98 µs | 38.9 µs | 2.52× | + | `FromBinaryShape/scalars / bjdata` | 25 ms | 11.6 ms | 2.15× | + | `FromBinaryShape/scalars / cbor` | 26 ms | 9.92 ms | 2.62× | + | `FromBinaryShape/scalars / msgpack` | 24.9 ms | 10.6 ms | 2.36× | + | `FromBinaryShape/scalars / ubjson` | 25.1 ms | 11.7 ms | 2.15× | + | `FromCborChunkedString/10000 chunks` | 91.2 µs | 82.7 µs | 1.10× | + | `FromMsgpack/canada` | 14.5 ms | 4.56 ms | 3.19× | + | `FromMsgpack/citm_catalog` | 9.22 ms | 2.32 ms | 3.98× | + | `FromMsgpack/floats` | 60.7 ms | 28.2 ms | 2.15× | + | `FromMsgpack/jeopardy` | 1,150 ms | 187 ms | 6.13× | + | `FromMsgpack/signed_ints` | 63.5 ms | 33 ms | 1.92× | + | `FromMsgpack/small_signed_ints` | 64.1 ms | 34.3 ms | 1.87× | + | `FromMsgpack/twitter` | 10.2 ms | 1.52 ms | 6.69× | + | `FromMsgpack/unsigned_ints` | 57 ms | 28 ms | 2.03× | + | `GetArray>` | 2.27 µs | 647 ns | 3.50× | + | `GetArray>` | 8.22 µs | 1.18 µs | 6.94× | + | `GetArray>` | 59.3 µs | 41.9 µs | 1.42× | + | `GetArray>` | 6.78 µs | 676 ns | 10× | + | `GetMap/citm_catalog` | 3.53 ms | 2.42 ms | 1.46× | + | `GetVectorDouble/floats` | 6.8 ms | 976 µs | 6.96× | + | `GetVectorInt/signed_ints` | 8.2 ms | 3.48 ms | 2.36× | + | `Iterate/canada` | 887 µs | 314 µs | 2.82× | + | `Iterate/citm_catalog` | 304 µs | 187 µs | 1.63× | + | `Iterate/twitter` | 87.7 µs | 61.9 µs | 1.42× | + | `JsonPointerAt/citm_catalog` | 1.87 ms | 1.18 ms | 1.59× | + | `JsonPointerAt/twitter` | 802 µs | 609 µs | 1.32× | + | `JsonPointerContains/citm_catalog` | 2.78 ms | 1.26 ms | 2.20× | + | `JsonPointerContains/twitter` | 1.32 ms | 626 µs | 2.11× | + | `JsonPointerParse/citm_catalog` | 5.82 ms | 2.23 ms | 2.62× | + | `JsonPointerParse/twitter` | 2.49 ms | 1.01 ms | 2.45× | + | `JsonPointerToString/citm_catalog` | 6.74 ms | 1.94 ms | 3.46× | + | `JsonPointerToString/twitter` | 2.23 ms | 820 µs | 2.72× | + | `ParseFILE/canada` | 53.3 ms | 14.3 ms | 3.72× | + | `ParseFILE/citm_catalog` | 35.5 ms | 7.58 ms | 4.69× | + | `ParseFILE/twitter` | 13.9 ms | 3.37 ms | 4.13× | + | `ParseFile/canada` | 17.9 ms | 6.38 ms | 2.81× | + | `ParseFile/citm_catalog` | 7.98 ms | 2.5 ms | 3.19× | + | `ParseFile/floats` | 129 ms | 50.8 ms | 2.54× | + | `ParseFile/jeopardy` | 335 ms | 163 ms | 2.05× | + | `ParseFile/signed_ints` | 127 ms | 47.8 ms | 2.65× | + | `ParseFile/small_signed_ints` | 64.5 ms | 32.4 ms | 1.99× | + | `ParseFile/twitter` | 3.45 ms | 1.41 ms | 2.44× | + | `ParseFile/unsigned_ints` | 123 ms | 45.5 ms | 2.71× | + | `ParseIndented/canada / 4` | 34.4 ms | 5.16 ms | 6.67× | + | `ParseIndented/citm_catalog / 4` | 7.42 ms | 1.79 ms | 4.15× | + | `ParseIndented/jeopardy / 4` | 342 ms | 133 ms | 2.56× | + | `ParseIndented/twitter / 4` | 3.67 ms | 1.15 ms | 3.19× | + | `ParseStreamValues/ndjson` | 7.13 ms | 3.75 ms | 1.90× | + | `ParseStreamValues/numbers` | 1.91 ms | 380 µs | 5.03× | + | `ParseString/canada` | 15.2 ms | 4.5 ms | 3.38× | + | `ParseString/citm_catalog` | 7.42 ms | 1.77 ms | 4.19× | + | `ParseString/floats` | 120 ms | 31.2 ms | 3.86× | + | `ParseString/jeopardy` | 307 ms | 132 ms | 2.33× | + | `ParseString/signed_ints` | 121 ms | 32.4 ms | 3.74× | + | `ParseString/small_signed_ints` | 62 ms | 22.5 ms | 2.75× | + | `ParseString/twitter` | 3.26 ms | 1.06 ms | 3.08× | + | `ParseString/unsigned_ints` | 119 ms | 30.9 ms | 3.86× | + | `ParseStringOrdered/canada` | 15.4 ms | 4.45 ms | 3.47× | + | `ParseStringOrdered/citm_catalog` | 11.3 ms | 1.67 ms | 6.76× | + | `ParseStringOrdered/jeopardy` | 371 ms | 114 ms | 3.24× | + | `ParseStringOrdered/twitter` | 4.52 ms | 920 µs | 4.91× | + | `Patch/canada` | 10.4 ms | 3.44 ms | 3.02× | + | `Patch/citm_catalog` | 2.65 ms | 1.69 ms | 1.57× | + | `Patch/twitter` | 1.54 ms | 871 µs | 1.77× | + | `SaxParse/canada` | 13 ms | 3.28 ms | 3.97× | + | `SaxParse/citm_catalog` | 6.49 ms | 996 µs | 6.51× | + | `SaxParse/twitter` | 2.51 ms | 478 µs | 5.26× | + | `ToCbor/canada` | 1.41 ms | 564 µs | 2.49× | + | `ToCbor/citm_catalog` | 1.04 ms | 261 µs | 4.00× | + | `ToCbor/floats` | 8.96 ms | 1.9 ms | 4.71× | + | `ToCbor/jeopardy` | 73.8 ms | 22.3 ms | 3.31× | + | `ToCbor/signed_ints` | 11.4 ms | 2.83 ms | 4.03× | + | `ToCbor/small_signed_ints` | 10.3 ms | 2.46 ms | 4.21× | + | `ToCbor/twitter` | 645 µs | 145 µs | 4.45× | + | `ToCbor/unsigned_ints` | 8.05 ms | 2.8 ms | 2.87× | + | `ToJsonStrings/copy` | 6.02 ms | 5.76 ms | 1.05× | + | `ToJsonStrings/move` | 6.05 ms | 3.12 ms | 1.94× | + | `Unflatten/canada` | 42.3 ms | 11 ms | 3.86× | + | `Unflatten/citm_catalog` | 10.1 ms | 3.55 ms | 2.83× | + | `Unflatten/twitter` | 4.79 ms | 2.17 ms | 2.21× | ### C. The timeline @@ -2210,7 +2212,7 @@ removed because 3.12.0 has no BON8. | 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 % | +| noise | the coefficient of variation was 3 % or less for 163 of the 182 rows with 3.12.0 and 161 with 3.13.0; the largest was 13 % | | 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.

@@ -2381,7 +2383,7 @@ measure binary size or memory use. [#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]. + digits [#5851][5851]; Żmij [#5634][5634]; long integers in `dump()` [#5964][5964]; 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 @@ -2560,3 +2562,4 @@ These are the checks behind the themes: [5908]: https://github.com/nlohmann/json/pull/5908 [5919]: https://github.com/nlohmann/json/pull/5919 [5926]: https://github.com/nlohmann/json/pull/5926 +[5964]: https://github.com/nlohmann/json/pull/5964 diff --git a/docs/mkdocs/docs/images/perf_blog_distribution.svg b/docs/mkdocs/docs/images/perf_blog_distribution.svg index e55dd7527..5fc8c227c 100644 --- a/docs/mkdocs/docs/images/perf_blog_distribution.svg +++ b/docs/mkdocs/docs/images/perf_blog_distribution.svg @@ -1,6 +1,6 @@ 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. +Bars counting the benchmarks per speedup range: below 1x: 1; 1 to 1.5x: 22; 1.5 to 2x: 17; 2 to 3x: 58; 3 to 5x: 55; 5 to 10x: 25; 10x or more: 4. Median 2.9x, geometric mean 2.9x. 0 @@ -9,26 +9,26 @@ 40 60 -below 1×: 2 -2 +below 1×: 1 +1 below 1× -1 to 1.5×: 23 -23 +1 to 1.5×: 22 +22 1 to 1.5× 1.5 to 2×: 17 17 1.5 to 2× -2 to 3×: 57 -57 +2 to 3×: 58 +58 2 to 3× -3 to 5×: 54 -54 +3 to 5×: 55 +55 3 to 5× -5 to 10×: 24 -24 +5 to 10×: 25 +25 5 to 10× -10× or more: 5 -5 +10× or more: 4 +4 10× or more speedup over 3.12.0, more is better diff --git a/docs/mkdocs/docs/images/perf_blog_overview.svg b/docs/mkdocs/docs/images/perf_blog_overview.svg index 47e1ab879..749d5aae0 100644 --- a/docs/mkdocs/docs/images/perf_blog_overview.svg +++ b/docs/mkdocs/docs/images/perf_blog_overview.svg @@ -1,6 +1,6 @@ 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. +Horizontal bars of the speedup, more is better. twitter.json 3.1x; citm_catalog.json 4.2x; canada.json 3.4x; canada.json, indented 6.7x; citm, ordered_json 6.8x; twitter, std::ifstream 2.4x; citm, FILE* 4.7x; citm, accept() 6.9x; dump() twitter 6.7x; dump() canada 2.9x; dump(4) citm 4.7x; to_cbor() twitter 4.5x; twitter, memory 3.2x; twitter, FILE* 6.4x; diff() canada 10x; iterate canada 2.8x; copy + destroy citm 1.11x; == citm 1.07x. Parsing Writing Reading C​BOR @@ -28,59 +28,59 @@ 11× twitter.json -twitter.json: 3.0× -3.0× +twitter.json: 3.1× +3.1× citm_catalog.json -citm_catalog.json: 4.1× -4.1× +citm_catalog.json: 4.2× +4.2× canada.json -canada.json: 3.5× -3.5× +canada.json: 3.4× +3.4× canada.json, indented -canada.json, indented: 6.7× -6.7× +canada.json, indented: 6.7× +6.7× citm, ordered_json -citm, ordered_json: 6.6× -6.6× +citm, ordered_json: 6.8× +6.8× twitter, std::ifstream -twitter, std::ifstream: 2.5× -2.5× +twitter, std::ifstream: 2.4× +2.4× citm, FILE* -citm, FILE*: 4.8× -4.8× +citm, FILE*: 4.7× +4.7× citm, accept() -citm, accept(): 7.0× -7.0× +citm, accept(): 6.9× +6.9× dump() twitter -dump() twitter: 6.7× -6.7× +dump() twitter: 6.7× +6.7× dump() canada -dump() canada: 3.0× -3.0× +dump() canada: 2.9× +2.9× dump(4) citm -dump(4) citm: 4.6× -4.6× +dump(4) citm: 4.7× +4.7× to_cbor() twitter -to_cbor() twitter: 4.5× -4.5× +to_cbor() twitter: 4.5× +4.5× twitter, memory -twitter, memory: 3.1× -3.1× +twitter, memory: 3.2× +3.2× twitter, FILE* -twitter, FILE*: 6.3× -6.3× +twitter, FILE*: 6.4× +6.4× diff() canada -diff() canada: 10× -10× +diff() canada: 10× +10× iterate canada -iterate canada: 2.7× -2.7× +iterate canada: 2.8× +2.8× copy + destroy citm copy + destroy citm: 1.11× 1.11× == citm -== citm: 1.04× -1.04× +== citm: 1.07× +1.07× speedup over 3.12.0 (3.12.0 = 1×), more 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 26c9461b9..0063d8cf5 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_accept_twitter.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_accept_twitter.svg @@ -1,6 +1,6 @@ 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, by theme: 4, 1, 4, 4, 2, 2. +accept() twitter.json: speedup over 3.12.0 at each of 317 commits, ending at 4.9x. Labeled steps, by theme: 4, 1, 4, 4, 2, 2. accept() twitter.json 1× @@ -16,7 +16,7 @@ Sep 2026 Oct - + #5234: 1.22× 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 5e3289709..2fb288dc1 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_dump_canada.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_dump_canada.svg @@ -16,7 +16,7 @@ Sep 2026 Oct - + #5285: 1.09× 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 69179234b..dc9544416 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_dump_twitter.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_dump_twitter.svg @@ -1,6 +1,6 @@ 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, by theme: 6, 2, 2, 2. +dump() twitter.json: speedup over 3.12.0 at each of 317 commits, ending at 6.9x. Labeled steps, by theme: 6, 2, 2, 2. dump() twitter.json 1× @@ -18,7 +18,7 @@ Sep 2026 Oct - + #5285: 3.3× 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 ee08d7ca5..1d2c6ca70 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 @@ -14,7 +14,7 @@ Sep 2026 Oct - + #5233: 1.47× 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 2402a0b50..6d72dc846 100644 --- a/docs/mkdocs/docs/images/perf_blog_timeline_parse_canada.svg +++ b/docs/mkdocs/docs/images/perf_blog_timeline_parse_canada.svg @@ -14,7 +14,7 @@ Sep 2026 Oct - + #5234: 1.11× 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 512b30758..5c0039434 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 @@ -14,7 +14,7 @@ Sep 2026 Oct - + #5828: 1.97× 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 b402c9879..3ff04710b 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,6 +1,6 @@ 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, by theme: 4, 6, 6. +to_cbor() twitter: speedup over 3.12.0 at each of 317 commits, ending at 5.1x. Labeled steps, by theme: 4, 6, 6. to_cbor() twitter 1× @@ -16,7 +16,7 @@ Sep 2026 Oct - + #5328: 2.2× diff --git a/docs/mkdocs/scripts/figures/data/perf_suite.csv b/docs/mkdocs/scripts/figures/data/perf_suite.csv index 1f2a17b83..14432919c 100644 --- a/docs/mkdocs/scripts/figures/data/perf_suite.csv +++ b/docs/mkdocs/scripts/figures/data/perf_suite.csv @@ -1,183 +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 +FromBinaryBuffer/bson / twitter,ns,3.20265e+06,1.01993e+06,3.140 +ParseStringOrdered/jeopardy,ns,3.70568e+08,1.14254e+08,3.243 +JsonPointerToString/twitter,ns,2.23197e+06,820138,2.721 +BinaryToCbor/8192,ns,520.964,261.625,1.991 +FromMsgpack/unsigned_ints,ns,5.69725e+07,2.80231e+07,2.033 +JsonPointerAt/twitter,ns,802316,609192,1.317 +CopyOnly/twitter,ns,420973,412550,1.020 +FlattenOrdered/citm_catalog,ns,2.56599e+08,1.43012e+06,179.425 +FromBinaryFile/ubjson / canada,ns,1.39411e+07,6.49692e+06,2.146 +FromBinaryShape/containers / bjdata,ns,1.43419e+07,7.40687e+06,1.936 +ParseIndented/jeopardy / 4,ns,3.41862e+08,1.33413e+08,2.562 +FromMsgpack/signed_ints,ns,6.35213e+07,3.30421e+07,1.922 +FromBinaryShape/containers / bson,ns,1.70519e+07,1.00034e+07,1.705 +BinaryToCbor/128,ns,254.611,116.411,2.187 +FromBinaryBuffer/cbor / jeopardy,ns,3.69767e+08,1.19253e+08,3.101 +ParseFile/jeopardy,ns,3.34742e+08,1.63435e+08,2.048 +FromMsgpack/jeopardy,ns,1.149e+09,1.87355e+08,6.133 +FromBinaryFile/cbor / twitter,ns,1.01844e+07,1.59657e+06,6.379 +ToCbor/floats,ns,8.95826e+06,1.90206e+06,4.710 +ParseFile/small_signed_ints,ns,6.45414e+07,3.24039e+07,1.992 +FromBinaryBuffer/msgpack / twitter,ns,3.12989e+06,955605,3.275 +BinaryToCbor/16384,ns,957.164,409.694,2.336 +FromBinaryFile/bson / twitter,ns,1.05564e+07,1.83313e+06,5.759 +ParseString/twitter,ns,3.26395e+06,1.06141e+06,3.075 +Unflatten/twitter,ns,4.7901e+06,2.16809e+06,2.209 +BinaryToCbor/8,ns,250.617,48.9987,5.115 +BinaryToCbor/16,ns,247.56,49.275,5.024 +Dump/small_signed_ints / 4,ns,2.52497e+07,8.83973e+06,2.856 +ParseString/jeopardy,ns,3.075e+08,1.31952e+08,2.330 +Dump/signed_ints / 4,ns,3.23205e+07,1.14372e+07,2.826 +Flatten/twitter,ns,3.63682e+06,2.08612e+06,1.743 +FromBinaryBuffer/cbor / twitter,ns,3.15556e+06,982723,3.211 +Dump/jeopardy / 4,ns,2.23755e+08,3.58432e+07,6.243 +SaxParse/citm_catalog,ns,6.48562e+06,996471,6.509 +JsonPointerAt/citm_catalog,ns,1.86838e+06,1.17763e+06,1.587 +DestroyOnly/citm_catalog,ns,896147,687189,1.304 +FromBinaryShape/scalars / ubjson,ns,2.51063e+07,1.16857e+07,2.148 +Unflatten/canada,ns,4.23131e+07,1.09708e+07,3.857 +ParseString/floats,ns,1.20329e+08,3.11796e+07,3.859 +ParseIndented/canada / 4,ns,3.44028e+07,5.15746e+06,6.670 +ParseString/signed_ints,ns,1.21464e+08,3.24369e+07,3.745 +ParseFile/signed_ints,ns,1.26509e+08,4.77756e+07,2.648 +JsonPointerContains/twitter,ns,1.32359e+06,626164,2.114 +Dump/floats / 4,ns,7.2051e+07,2.47002e+07,2.917 +Dump/floats / -,ns,6.40617e+07,2.40284e+07,2.666 +ToCbor/canada,ns,1.40569e+06,563628,2.494 +FromBinaryBuffer/bson / canada,ns,9.59257e+06,5.45604e+06,1.758 +ToCbor/twitter,ns,645140,144838,4.454 +ParseIndented/twitter / 4,ns,3.66555e+06,1.1496e+06,3.189 +Iterate/citm_catalog,ns,304057,186693,1.629 +FromBinaryBuffer/bjdata / canada,ns,8.44949e+06,4.18085e+06,2.021 +ParseStreamValues/ndjson,ns,7.13248e+06,3.74646e+06,1.904 +Diff/twitter,ns,4.9487e+06,655350,7.551 +Dump/citm_catalog / -,ns,1.41491e+06,296958,4.765 +FromBinaryShape/nested / bjdata,ns,97444.8,39017.8,2.497 +ToJsonStrings/copy,ns,6.02335e+06,5.76289e+06,1.045 +Dump/canada / 4,ns,9.0251e+06,3.05796e+06,2.951 +CopyRing/twitter,ns,923459,836502,1.104 +FromBinaryBuffer/cbor / citm_catalog,ns,3.83804e+06,1.48497e+06,2.585 +FromBinaryFile/bjdata / twitter,ns,1.07571e+07,1.97984e+06,5.433 +FromBinaryShape/containers / ubjson_optimized,ns,1.51034e+07,4.91673e+06,3.072 +FromMsgpack/citm_catalog,ns,9.2234e+06,2.31697e+06,3.981 +CopyOnly/canada,ns,1.57914e+06,1.55103e+06,1.018 +Equal/canada,ns,469788,342475,1.372 +Diff/citm_catalog,ns,7.13383e+06,1.10739e+06,6.442 +ParseStringOrdered/canada,ns,1.54143e+07,4.44693e+06,3.466 +Flatten/canada,ns,2.92397e+07,1.13461e+07,2.577 +Accept/canada,ns,1.28601e+07,2.33328e+06,5.512 +CopyAssign/twitter,ns,886807,758771,1.169 +BinaryToCbor/4096,ns,408.287,177.133,2.305 +ParseFILE/citm_catalog,ns,3.554e+07,7.57816e+06,4.690 +ToCbor/signed_ints,ns,1.13842e+07,2.82539e+06,4.029 +Patch/canada,ns,1.03856e+07,3.44306e+06,3.016 +GetArray>,ns,6775.31,675.66,10.028 +Dump/canada / -,ns,6.83829e+06,2.34599e+06,2.915 +GetVectorDouble/floats,ns,6.79501e+06,976472,6.959 +Accept/citm_catalog,ns,6.46161e+06,933820,6.920 +ParseFILE/twitter,ns,1.39242e+07,3.37101e+06,4.131 +FromBinaryBuffer/msgpack / jeopardy,ns,3.62314e+08,1.12333e+08,3.225 +ParseFile/floats,ns,1.29093e+08,5.07947e+07,2.541 +Accept/small_signed_ints,ns,5.70115e+07,1.92594e+07,2.960 +Accept/jeopardy,ns,2.18621e+08,6.48811e+07,3.370 +Accept/signed_ints,ns,1.17114e+08,2.90352e+07,4.034 +CopyRing/canada,ns,3.85335e+06,2.97856e+06,1.294 +Patch/twitter,ns,1.54075e+06,870596,1.770 +Iterate/twitter,ns,87674.1,61938.2,1.416 +ParseFile/twitter,ns,3.45242e+06,1.4135e+06,2.442 +GetArray>,ns,8218.06,1184.36,6.939 +FromBinaryBuffer/cbor / canada,ns,8.49597e+06,2.34162e+06,3.628 +Equal/twitter,ns,144862,130449,1.110 +ParseStreamValues/numbers,ns,1.91254e+06,380019,5.033 +Dump/small_signed_ints / -,ns,1.79973e+07,8.03116e+06,2.241 +JsonPointerToString/citm_catalog,ns,6.73543e+06,1.94403e+06,3.465 +Copy/twitter,ns,817423,747760,1.093 +Diff/canada,ns,3.94496e+07,3.76295e+06,10.484 +FromBinaryBuffer/ubjson_optimized / twitter,ns,3.21798e+06,976128,3.297 +BinaryToCbor/32,ns,257.519,50.0744,5.143 +GetArray>,ns,59334.9,41926.5,1.415 +CopyAssign/citm_catalog,ns,1.74826e+06,1.58974e+06,1.100 +ToCbor/jeopardy,ns,7.37854e+07,2.23113e+07,3.307 +CopyRing/citm_catalog,ns,1.82401e+06,1.5913e+06,1.146 +FromBinaryBuffer/ubjson / canada,ns,8.42613e+06,4.2011e+06,2.006 +ToCbor/small_signed_ints,ns,1.03308e+07,2.45559e+06,4.207 +DestroyOnly/canada,ns,2.19064e+06,1.40424e+06,1.560 +FromBinaryBuffer/ubjson / citm_catalog,ns,3.94636e+06,1.77126e+06,2.228 +Dump/jeopardy / -,ns,2.0472e+08,3.20386e+07,6.390 +FromBinaryBuffer/msgpack / citm_catalog,ns,3.83422e+06,1.44289e+06,2.657 +ParseStringOrdered/citm_catalog,ns,1.13087e+07,1.6737e+06,6.757 +ParseString/unsigned_ints,ns,1.19395e+08,3.09133e+07,3.862 +Patch/citm_catalog,ns,2.64909e+06,1.68738e+06,1.570 +SaxParse/canada,ns,1.30153e+07,3.28081e+06,3.967 +ParseString/citm_catalog,ns,7.42082e+06,1.77268e+06,4.186 +FromBinaryFile/cbor / canada,ns,1.45988e+07,4.52323e+06,3.228 +BinaryToCbor/256,ns,271.407,91.5071,2.966 +ParseFILE/canada,ns,5.33064e+07,1.43382e+07,3.718 +BinaryToCbor/32768,ns,1549.96,819.172,1.892 +Accept/floats,ns,1.14306e+08,2.47177e+07,4.624 +FromMsgpack/floats,ns,6.06523e+07,2.81624e+07,2.154 +ParseString/small_signed_ints,ns,6.20261e+07,2.25358e+07,2.752 +JsonPointerParse/citm_catalog,ns,5.82111e+06,2.2258e+06,2.615 +Copy/canada,ns,3.76091e+06,2.89932e+06,1.297 +Dump/twitter / 4,ns,1.622e+06,252594,6.421 +FromBinaryShape/nested / msgpack,ns,94122.7,35186.9,2.675 +FromBinaryBuffer/ubjson_optimized / canada,ns,8.64985e+06,2.85754e+06,3.027 +JsonPointerContains/citm_catalog,ns,2.77749e+06,1.26131e+06,2.202 +FromMsgpack/small_signed_ints,ns,6.40964e+07,3.42736e+07,1.870 +DestroyOnly/twitter,ns,415737,326784,1.272 +FromBinaryShape/containers / msgpack,ns,1.42568e+07,3.89814e+06,3.657 +FromBinaryShape/scalars / msgpack,ns,2.4908e+07,1.05741e+07,2.356 +ToCbor/citm_catalog,ns,1.04281e+06,260809,3.998 +GetVectorInt/signed_ints,ns,8.20129e+06,3.48162e+06,2.356 +Accept/twitter,ns,2.49861e+06,475874,5.251 +Iterate/canada,ns,886750,314350,2.821 +ToCbor/unsigned_ints,ns,8.05242e+06,2.80275e+06,2.873 +FromBinaryShape/scalars / bjdata,ns,2.49885e+07,1.16227e+07,2.150 +BinaryToCbor/2048,ns,331.702,126.762,2.617 +BinaryToCbor/512,ns,287.238,102.34,2.807 +FlattenOrdered/twitter,ns,5.11231e+07,877575,58.255 +Copy/citm_catalog,ns,1.66893e+06,1.50237e+06,1.111 +FromBinaryShape/containers / ubjson,ns,1.44781e+07,7.34134e+06,1.972 +BinaryToCbor/1024,ns,294.38,106.974,2.752 +FromBinaryBuffer/ubjson / twitter,ns,3.27965e+06,973396,3.369 +Dump/signed_ints / -,ns,2.3995e+07,1.07412e+07,2.234 +FromBinaryShape/scalars / cbor,ns,2.59955e+07,9.92397e+06,2.619 +FromBinaryBuffer/cbor / signed_ints,ns,3.6394e+07,1.32489e+07,2.747 +CopyOnly/citm_catalog,ns,773309,805343,0.960 +Dump/unsigned_ints / -,ns,2.37018e+07,8.11504e+06,2.921 +Accept/unsigned_ints,ns,1.16121e+08,2.82332e+07,4.113 +FromMsgpack/canada,ns,1.45399e+07,4.55571e+06,3.192 +ParseStringOrdered/twitter,ns,4.522e+06,920414,4.913 +Dump/twitter / -,ns,1.4183e+06,210619,6.734 +BinaryToCbor/64,ns,256.225,82.8609,3.092 +JsonPointerParse/twitter,ns,2.48884e+06,1.01455e+06,2.453 +GetMap/citm_catalog,ns,3.52983e+06,2.42484e+06,1.456 +ToJsonStrings/move,ns,6.05077e+06,3.12298e+06,1.938 +FromBinaryBuffer/ubjson / jeopardy,ns,3.73253e+08,1.17316e+08,3.182 +FromBinaryShape/nested / ubjson,ns,98047.3,38860.2,2.523 +FromBinaryBuffer/bjdata / twitter,ns,3.27193e+06,973613,3.361 +FromBinaryShape/nested / cbor,ns,94082.1,35427.1,2.656 +ParseFile/citm_catalog,ns,7.97956e+06,2.49852e+06,3.194 +FromBinaryFile/ubjson / twitter,ns,1.07792e+07,1.96519e+06,5.485 +Dump/citm_catalog / 4,ns,1.96876e+06,421277,4.673 +CopyAssign/canada,ns,3.82927e+06,3.00436e+06,1.275 +Unflatten/citm_catalog,ns,1.00575e+07,3.55051e+06,2.833 +FromBinaryBuffer/bjdata_optimized / twitter,ns,3.21663e+06,972271,3.308 +FromBinaryBuffer/cbor / floats,ns,2.94008e+07,8.37306e+06,3.511 +Equal/citm_catalog,ns,277722,260273,1.067 +FromBinaryShape/containers / cbor,ns,1.43595e+07,4.00487e+06,3.585 +Flatten/citm_catalog,ns,6.65353e+06,3.02263e+06,2.201 +FromMsgpack/twitter,ns,1.01696e+07,1.51935e+06,6.693 +FromBinaryBuffer/bson / citm_catalog,ns,4.00639e+06,1.77129e+06,2.262 +FromBinaryBuffer/msgpack / canada,ns,8.59297e+06,2.37267e+06,3.622 +"GetArray>",ns,2267.99,647.261,3.504 +SaxParse/twitter,ns,2.51436e+06,478188,5.258 +ParseString/canada,ns,1.52394e+07,4.50457e+06,3.383 +ParseFile/canada,ns,1.7916e+07,6.38308e+06,2.807 +ParseFile/unsigned_ints,ns,1.23238e+08,4.54686e+07,2.710 +FromCborChunkedString/10000 chunks,ns,91163.3,82651.6,1.103 +FromBinaryShape/nested / bson,ns,103727,47568.2,2.181 +ParseIndented/citm_catalog / 4,ns,7.41873e+06,1.78703e+06,4.151 +Dump/unsigned_ints / 4,ns,3.1907e+07,8.51588e+06,3.747 +FromBinaryBuffer/bjdata_optimized / canada,ns,8.84399e+06,2.9307e+06,3.018 diff --git a/docs/mkdocs/scripts/figures/data/perf_timeline.csv b/docs/mkdocs/scripts/figures/data/perf_timeline.csv index 063733cec..7c1dfad94 100644 --- a/docs/mkdocs/scripts/figures/data/perf_timeline.csv +++ b/docs/mkdocs/scripts/figures/data/perf_timeline.csv @@ -315,4 +315,4 @@ index,commit,date,pr,subject,parse_twitter,parse_citm,parse_canada,parse_citm_co 313,21ec9bd801,2026-10-27,5915,json_view: fewer allocations when parsing small documents (#5915),1388.282,2469.118,6066.495,2340.391,1744.901,478.745,214.934,292.970,2309.264,422.842,1323.237,138.541,1454.151,1707.314,178.058,366.514,958.110 314,2bb2feeef4,2026-10-27,5942,"Fix the red CI on develop (json_view pointer tokens, bson, from_json tests, Infer, IWYU) (#5942)",1391.981,2468.266,6068.495,2335.707,1751.527,482.908,214.285,291.291,2300.453,417.876,1328.089,138.010,1454.934,1701.845,178.250,367.182,964.917 315,78a0687147,2026-10-27,5940,Strong exception guarantee for operator[](json_pointer) (#5940),1379.414,2467.492,6109.136,2335.309,1723.090,480.260,216.197,292.075,2313.798,415.444,1314.530,138.314,1449.629,1698.792,177.628,364.844,965.314 -316,candidate,,,develop + open pull requests,1383.171,2465.866,6049.771,2336.394,1725.095,480.882,214.967,292.621,2289.324,418.010,1320.853,137.793,1439.615,1710.333,176.356,364.229,962.166 +316,candidate,,,develop + open pull requests,1402.914,2466.859,6056.321,2327.213,1716.548,486.579,209.924,290.378,2287.966,417.106,1309.461,135.437,1437.370,1702.301,177.011,363.994,991.766 diff --git a/docs/mkdocs/scripts/figures/perf_blog.py b/docs/mkdocs/scripts/figures/perf_blog.py index d27e5f233..5882dde72 100644 --- a/docs/mkdocs/scripts/figures/perf_blog.py +++ b/docs/mkdocs/scripts/figures/perf_blog.py @@ -117,24 +117,24 @@ def swar(): # ---------- overview: speedup per workload (Google Benchmark rows, 3.12.0 time / 3.13.0 time) ---------- # (group, label, speedup), copied from the table "The short version" OVERVIEW = [ - ("Parsing", "twitter.json", 3.02), - ("Parsing", "citm_catalog.json", 4.13), - ("Parsing", "canada.json", 3.46), - ("Parsing", "canada.json, indented", 6.74), - ("Parsing", "citm, ordered_json", 6.58), - ("Parsing", "twitter, std::ifstream", 2.46), - ("Parsing", "citm, FILE*", 4.76), - ("Parsing", "citm, accept()", 6.99), - ("Writing", "dump() twitter", 6.67), - ("Writing", "dump() canada", 2.95), - ("Writing", "dump(4) citm", 4.63), - ("Writing", "to_cbor() twitter", 4.50), - ("Reading CBOR", "twitter, memory", 3.11), - ("Reading CBOR", "twitter, FILE*", 6.31), - ("Values", "diff() canada", 10.44), - ("Values", "iterate canada", 2.69), + ("Parsing", "twitter.json", 3.08), + ("Parsing", "citm_catalog.json", 4.19), + ("Parsing", "canada.json", 3.38), + ("Parsing", "canada.json, indented", 6.67), + ("Parsing", "citm, ordered_json", 6.76), + ("Parsing", "twitter, std::ifstream", 2.44), + ("Parsing", "citm, FILE*", 4.69), + ("Parsing", "citm, accept()", 6.92), + ("Writing", "dump() twitter", 6.73), + ("Writing", "dump() canada", 2.92), + ("Writing", "dump(4) citm", 4.67), + ("Writing", "to_cbor() twitter", 4.45), + ("Reading CBOR", "twitter, memory", 3.21), + ("Reading CBOR", "twitter, FILE*", 6.38), + ("Values", "diff() canada", 10.48), + ("Values", "iterate canada", 2.82), ("Values", "copy + destroy citm", 1.11), - ("Values", "== citm", 1.04), + ("Values", "== citm", 1.07), ]