- One machine, one run. Measured by
npm run bench -- --write-doc
- Machine: Intel Core i7-13700K, Windows x64. Schema:
serializer.deuk
- Do not mix with numbers from other machines
Summary
dppack vs protobuf-compatible: pack ×3.3 to ×21, unpack ×3.2 to ×14 faster
dppack vs JSON: pack ×4.8 to ×37, unpack ×9.8 to ×26 faster
- Large tree record: 7,038 bytes as JSON → 2,780 as
dppack
Harness
| Language |
Harness |
Runtime |
| TypeScript, JavaScript |
tinybench 6.2.5 |
Node.js 22.17 |
| Python |
pyperf 2.11.0 |
CPython 3.14.5 |
| C++ |
Google Benchmark 1.9.1 |
MSVC |
| C# |
BenchmarkDotNet 0.15.8 |
.NET 11 |
| Rust |
criterion 0.5.1 |
rustc 1.96 |
dppack operations per second (pack / unpack)
| Language |
Point |
Flat |
Bundles |
Tree |
| typescript |
39.8M / 79.4M |
2.62M / 2.50M |
711K / 556K |
149K / 92K |
| javascript |
39.1M / 78.5M |
2.79M / 2.50M |
696K / 556K |
146K / 103K |
| python |
1.01M / 572K |
270K / 141K |
32K / 20K |
11K / 3K |
| cpp |
32.6M / 60.8M |
17.2M / 10.5M |
3.31M / 556K |
835K / 199K |
| csharp |
49.7M / 86.4M |
11.6M / 14.0M |
2.44M / 1.52M |
421K / 247K |
| rust |
35.9M / 116.6M |
16.8M / 6.10M |
5.66M / 696K |
1.07M / 125K |
| Language |
xpb |
xtbinary |
xtcompact |
dpjson |
| typescript |
×21 / ×14 |
×7.6 / ×4.2 |
×9.8 / ×7.0 |
×37 / ×26 |
| javascript |
×21 / ×12 |
×6.7 / ×3.0 |
×8.8 / ×5.5 |
×35 / ×25 |
| python |
×4.0 / ×3.2 |
×2.4 / ×1.9 |
×2.9 / ×1.9 |
×4.8 / ×10.0 |
| cpp |
×3.6 / ×3.8 |
×2.3 / ×2.1 |
×2.7 / ×2.3 |
×6.4 / ×9.8 |
| csharp |
×3.3 / ×5.0 |
×2.7 / ×3.1 |
×2.8 / ×3.6 |
×9.1 / ×22 |
| rust |
×8.0 / ×4.5 |
×5.0 / ×2.6 |
×5.5 / ×3.1 |
×16 / ×17 |
- ×N = geometric mean over records
Encoded size (bytes)
| Record |
dppack |
xpb |
xtbinary |
xtcompact |
dpjson |
| Point |
17 |
17 |
15 |
9 |
24 |
| Flat |
130 |
122 |
162 |
83 |
316 |
| Bundles |
596 |
|
722 |
483 |
1215 |
| Tree |
2780 |
2839 |
4849 |
2851 |
7038 |
- Bundles cannot be expressed in proto3 → no
xpb
| Language |
xpb |
xtbinary |
xtcompact |
dpjson |
| typescript |
×16 / ×18 |
×2.8 / ×3.1 |
×4.3 / ×5.2 |
×19 / ×18 |
| javascript |
×16 / ×17 |
×2.7 / ×3.1 |
×4.1 / ×5.0 |
×17 / ×17 |
| python |
×1.0 / ×1.0 |
×1.2 / ×1.0 |
×1.0 / ×1.0 |
×1.7 / ×1.2 |
| cpp |
×15 / ×46 |
×2.1 / ×2.0 |
×3.5 / ×4.1 |
×12 / ×12 |
| csharp |
×2.2 / ×2.0 |
×1.5 / ×1.2 |
×1.5 / ×1.5 |
×23 / ×6.6 |
| rust |
×4.9 / ×5.4 |
×3.7 / ×2.5 |
×2.8 / ×2.2 |
×8.9 / ×6.8 |