Package versions and protocol versions are different. Published package scope: runtime DevOp.Toon 0.3.0, Core 0.2.0, API 0.2.0, and Client 0.2.0. Runtime 0.3.0 supports these protocol selections:
| TOON protocol | ToonProtocolVersion |
Write / serialize | Read / deserialize |
|---|---|---|---|
| Official 3.0 | V3_0 |
Yes | Yes |
| Official 4.0 | V4_0 |
Yes | Yes |
| Official 4.1 | V4_1 |
Yes | Yes |
| Official 4.2 | V4_2 |
Yes | Yes |
| Official 4.3 | V4_3 |
Yes | Yes |
| Official 4.4 | V4_4 |
Yes — default | Yes |
| Legacy custom | CustomLegacy |
Yes | Yes |
| Custom 4.4 | CustomV4_4 |
Yes | Yes |
| Automatic detection | Auto |
No | Yes — default; ambiguous input requires a hint |
The official 3.0 entry means 3.0, not all 3.x releases. Pinned fixture provenance is 3.0.0, 4.0.0, 4.1.3, 4.2.1, 4.3.0, and 4.4.0. These fixture tags identify the checked-in specification test inputs; they are not NuGet versions or a promise of support for every release in a major series.
Runtime, Core, and Client target .NET Standard 2.0 and .NET 8, 9, and 10. API targets .NET 8 and 10. Framework targets are independent of the TOON wire protocol.
Select the enum when serializing. Supply it when decoding known legacy or ambiguous input. Custom formats require compatible readers at both ends. Version selection and migration guide · Pinned fixture provenance.
This section concerns DevOp.Toon 0.3.0, published with Core 0.2.0, API 0.2.0, and Client 0.2.0. It is separate from the April 2026 historical results below.
This run loads the actual NuGet binaries: DevOp.Toon 0.3.0 / Core 0.2.0, compared where
stated with DevOp.Toon 0.2.9 / Core 0.1.3. It measures all 2,051 products, normalized
through the existing Product DTOs, on .NET 10.0.13 (Linux x64). Each profile has 30 warmups
and 50 samples, with DOTNET_TieredCompilation=0 and no forced GC inside timed samples.
Values below are medians. This is in-process serialization, not network/API timing.
| Profile | Encode ms | Explicit decode ms | Auto decode ms | Decode allocated bytes | UTF-8 bytes |
|---|---|---|---|---|---|
| Official 4.4, omissions off | 28.23 | 62.35 | 86.52 | 27,730,160 | 5,959,545 |
| Custom 4.4, omissions off | 19.98 | 43.51 | 54.08 | 10,242,568 | 2,939,907 |
| Custom 4.4, compact omissions | 18.93 | 33.29 | 44.63 | 9,000,048 | 2,547,079 |
Both omission-off profiles preserve the complete normalized DTO model. Auto and explicit
results have identical decoded-model hashes. Compact omissions intentionally change the model.
These three profiles run sequentially within one process, so shared-pool history can affect
cross-profile timings. Use isolated repetitions when assessing a performance budget.
Each side runs in a fresh process with the same DTO input and omission flags set to false:
| Published package/profile | Encode ms | Decode ms | Encode allocated bytes | Decode allocated bytes | UTF-8 bytes |
|---|---|---|---|---|---|
| 0.2.9 legacy custom | 21.53 | 32.95 | 12,963,488 | 17,686,776 | 3,059,139 |
| 0.3.0 custom 4.4 | 18.25 | 38.56 | 7,213,952 | 10,242,568 | 2,939,907 |
In this pair, custom 4.4 allocates 42.1% less memory during decoding and produces a 3.9% smaller
payload, with 17.0% slower decoding. These are different wire layouts; the legacy
regression budget is evaluated separately using equivalent profiles.
The old encoder rounds -296.33000000000004 to -296.33 on product 18. Its source-model
roundtrip therefore fails even with omissions off; that frozen defect is not attributed to 0.3.0.
The new custom profile matches the DTO model. A separate raw-DOM checker covers the original
JSON's Publication member, which is absent from the Product DTO and excluded from these timings.
6a61143339707e2b76360d56bb28b13effdf2da4.03af9a78e30cc334010edc9146996bf117820608.0DE811F8932BAFBD0596894CFF93EEBD5CB671CCD752321AC473D97697955A59.664FB3DF914A26C99F0943F941E4B722A4BB41DA1FEB392D668E21ED6D80553F.9619D5D9D5DDAE0544F07E0D37AB8D4154B9E43B73731109CD77E85679B595DD.The published-package harness records loaded
library hashes, output/model hashes, sample settings and raw measurements. It restores the
selected published runtime/Core packages directly, without local runtime project references.
Raw reports and package archives remain in ignored local evidence storage.
Earlier source-build, stream-buffer, small-DTO and transport-option experiments are recorded
in OptimizationReview.md. The April 2026 JSON comparisons used a
different runtime, profile and collection method; they are historical results, not this run.
The benchmark must compare equal represented data: lossless profiles have IgnoreNullOrEmpty = false and ExcludeEmptyArrays = false; compact custom profiles intentionally omit values and are reported separately. Official 4.4 and custom 4.4 are distinct wire profiles. Automatic detection adds work beyond explicitly selected decoding. Raw payload size, compression size, CPU time, and allocations answer different questions.
Current product benchmark report and methodology · Reproducible protocol benchmark harness.
All tables and narrative below, through the historical methodology, describe the 2026-04-19 measurements on .NET 10.0.6. They are preserved for provenance and must not be read as runtime 0.3.0 results. The historical compact custom profile omitted null/empty values; official 4.4 is now the default and does not enable those omissions.
| Stat | What it measures |
|---|---|
| 77.7% smaller | Raw payload on a real 2,051-product file |
| 20.1% smaller | Warehouses dataset after gzip |
| 2.02× faster encode | Products dataset, 1,000 items |
| 1.40× faster decode | Real-world 2,051-product file |
TOON uses a columnar array layout for object arrays, which eliminates repeated key names across records. A thousand products encode the field names once, not a thousand times. Combined with IgnoreNullOrEmpty and ExcludeEmptyArrays in that historical custom profile — which omit null and empty fields from the output — TOON typically produces 40–78% smaller payloads on structured business data.
Size reduction varies with data shape. Repeated rows and nested collections compress best; shallow payloads dominated by unique strings see modest gains. Compression narrows the gap but doesn't close it.
| Dataset | JSON bytes | TOON bytes | Raw saved | Gzip saved | Brotli saved |
|---|---|---|---|---|---|
| Real-world products (2,051) | 11,520,246 | 2,568,353 | 77.7% | 15.9% | 10.5% |
| Warehouses | 849,281 | 200,114 | 76.4% | 20.1% | 20.0% |
| Flat Orders | 151,066 | 55,142 | 63.5% | 15.7% | 7.7% |
| Products (1,000 items) | 2,878,419 | 1,253,844 | 56.4% | 14.6% | 9.0% |
| Change Fields | 300,822 | 176,965 | 41.2% | 7.4% | 4.0% |
| Configuration | 15,366 | 9,299 | 39.5% | 4.4% | 5.2% |
| Catalog | 283,047 | 257,070 | 9.2% | 6.9% | 11.7% |
On the real-world file that's 354 KB gzipped versus 422 KB for gzipped JSON — meaningful across millions of requests.
Decode is where TOON most often beats JSON. Smaller payloads mean fewer tokens to parse.
| Dataset | JSON (ms) | TOON (ms) | Speedup |
|---|---|---|---|
| Change Fields | 1.676 | 0.854 | 1.96× |
| Real-world 2,051-product file | 26.1 | 18.6 | 1.40× |
| Warehouses | 3.630 | 2.997 | 1.21× |
| Products (1,000 items) | 35.626 | 35.049 | 1.02× |
Encode is scale-dependent. At 1,000+ rows of the same shape, TOON's columnar planning pays for itself — 2.02× faster on Products. On small, flat datasets the planning overhead exceeds the savings.
| Dataset | JSON (ms) | TOON (ms) | Speedup |
|---|---|---|---|
| Products (1,000 items) | 36.550 | 18.050 | 2.02× |
| Warehouses | 2.051 | 2.350 | 0.87× |
| Change Fields | 0.718 | 0.838 | 0.86× |
| Configuration | 0.059 | 0.068 | 0.87× |
| Flat Orders | 0.794 | 2.026 | 0.39× |
| Catalog | 1.957 | 5.202 | 0.38× |
If most of your writes are small, flat, one-off payloads, TOON encode is a wash or slower. If you ship collections, the arithmetic flips quickly.
Same controller, same data, served as either JSON or TOON from an in-process ASP.NET Core test. Five warmup plus twelve measured iterations. Smaller payloads flush sooner, and that turns into real wall-clock time back to the client.
| Dataset | JSON (ms) | TOON (ms) | Delta | Raw saved |
|---|---|---|---|---|
| Catalog | 12.369 | 11.628 | −0.741 ms | 56.3% |
| Products | 11.396 | 10.827 | −0.569 ms | 56.3% |
One dataset wins on every axis we measured. The Warehouses payload — a nested warehouse subtree with repetitive record structure — combines heavily repeated keys with deep nesting. That's exactly what TOON's columnar layout was built for.
| Metric | Result |
|---|---|
| Raw payload | 76.4% smaller than JSON |
| After gzip | 20.1% smaller |
| After brotli | 20.0% smaller |
| Encode allocations | 42% less (0.58× JSON) |
| Decode speed | 1.21× faster |
If your payloads look like this — nested collections of same-shape records — Warehouses is the benchmark to look at, not the averages.
The strongest single data point: 2,051 actual product records, encoded once and measured end-to-end.
| JSON | TOON | Saved | |
|---|---|---|---|
| Raw | 11.52 MB | 2.57 MB | 77.7% |
| Gzipped | 422 KB | 355 KB | 15.9% |
| Brotli | 275 KB | 246 KB | 10.5% |
| Decode time | 26.1 ms | 18.6 ms | 1.40× faster |
TOON shines on:
Stay on JSON when:
On most datasets TOON allocates more transient heap during encode and decode than System.Text.Json — typically 1.1× to 2.6× — with Warehouses as the standout exception at 0.58× on encode. This is the trade-off for the columnar layout: shrinking bytes on the wire costs some CLR work to plan the column structure. If your bottleneck is payload size or network time, that trade is usually worth it. If it's GC pressure on a hot path, benchmark your specific shape.
GC.Collect() is called between runs to isolate allocation measurementsGC.GetAllocatedBytesForCurrentThread()CompressionLevel.SmallestSize; under Optimal the gap narrows slightly| Property | Value |
|---|---|
| Date | 2026-04-19 |
| Runtime | .NET 10.0.6 |
| OS | Zorin OS 18.1 |
| Architecture | x64 |
| Logical CPUs | 16 |
| Items per synthetic dataset | 1,000 |
| Warm iterations per case | 15 |
| Dataset | Description |
|---|---|
| Flat Orders | Uniform DTO rows; ideal for tabular TOON encoding |
| Catalog | Synthetic nested catalog payload with arrays and embedded objects |
| Products | Real-world mixed product payload from benchmark test data |
| Warehouses | Nested warehouse subtree extracted from products |
| Change Fields | Small repetitive row shape that benefits from compact tabular encoding |
| Configuration | Document-style nested config object with service arrays |
IgnoreNullOrEmpty and ExcludeEmptyArrays