Serialization 101 & Benchmark Reports — theory, methodology, and results for senior engineers and data scientists.
Scientific, multi-language benchmark suite for comparing serialization libraries fairly: identical conceptual payloads, dual I/O modes (bytes/stream), nanosecond timing (C# ticks normalized in analysis), and publication-oriented statistics (bootstrap CIs, effect sizes, non-parametric A/B tests).
| Audience | Use case |
|---|---|
| Researchers | Reproducible methods, CIs, effect sizes, configurable outlier/warmup policy |
| Serializer authors | Compare old vs new version: --compare-a old.csv --compare-b new.csv |
| System integrators | Custom payloads (schemas/test_data_config.json) and environments; same CSV + analysis pipeline |
| Engineers | Pick a serializer for a language/runtime with apples-to-apples metrics |
| Language | Harness | Serializers (target) | Logs |
|---|---|---|---|
| C# (.NET) | c-sharp/ |
38 | logs/csharp/ |
| Python | python/ |
10 | logs/python/ |
| Rust | rust/ |
12 | logs/rust/ |
| C | c/ |
12 | logs/c/ |
| JavaScript (Node) | javascript/ |
11–12 | logs/javascript/ |
Add more languages via docs/architecture/ADDING_A_LANGUAGE.md.
Most parameters live in config/benchmark_config.yaml (modes, statistics, languages, CSV schema, paths). Test-data shape/seed: schemas/test_data_config.json.
# One language (smoke)
./rust/scripts/run-benchmarks.sh smoke
./c/scripts/run-benchmarks.sh smoke
./javascript/scripts/run-benchmarks.sh smoke
./python/scripts/run-benchmarks.sh smoke # may use Docker
./c-sharp/scripts/run-benchmarks.sh smoke
# All languages
./scripts/run-all-benchmarks.sh --mode all-single
# One language only
./scripts/run-all-benchmarks.sh --mode full --lang rust
# Analysis (install analysis package first)
cd analysis && pip install -e . # or: uv pip install -e .
analyze-benchmarks --generate-summary --generate-plots --output-dir ../reports
# Serializer version A vs B
analyze-benchmarks --compare-a logs/rust/v1.csv --compare-b logs/rust/v2.csv --output-dir reportsModes: smoke (2 reps) · all-single (10) · full (100) · research (500) — see config.
- Person, Integer, Telemetry, SimpleObject, StringArray, EDI_835, ObjectGraph (cycles; only graph-capable serializers)
- Config: Test data configuration
See Analysis methodology and statistics: in the master config:
- Exclude warmup (rep 0)
- IQR outlier filter
- Mean / median / std / MAD / CV / percentiles
- Bootstrap 95% CI on the mean
- Cliff's δ + Hedges' g vs fastest in group
- Optional Mann–Whitney U + Holm for A/B versions
- Architecture
- Adding a language
- Harness contract: emit
logs/<lang>/benchmark-log.csvwithLanguage=<id>, times in nanoseconds (except legacy C# ticks)
Language-specific serializer lists:
- C# · Python
- Rust · C · JavaScript
MIT