Skip to content

Python — Benchmark Results

Generated: 2026-07-11T10:57:31.964813

Published local snapshot (not regenerated by GitHub Actions). Numbers may differ if you re-run benchmarks on another machine.

Serializer inventory and caveats: Python overview. Methods: Analysis Methodology. Metric definitions & importance tiers: Metrics catalog.

Pivot tables

Multi-way leaderboards emphasize high-importance metrics (configurable via metrics.multi_way in master config). Harness modes (CSV StringOrStream): bytes mode = in-memory buffer API; stream mode = write/read through a stream-like path. These names are not payload sizes. In each table, rows are sorted by serializer name; bold marks the semantic best value in that column (lowest time; highest ops/s). Ties are all bolded. Latency tables are in microseconds (µs). Batch fixtures show as Type · N instances (from DataTypeInstanceCount; e.g. Message · 100 instances).

Summary

Default multi-serializer view shows high-importance metrics only (METRICS.md). Rows are sorted by serializer name. Bold marks the semantic best value in each column (lowest latency / size; highest ops/s). Pairwise / version A/B reports use the full metric set. Latency cells are µs (analysis storage remains ns).

serializer Median total (µs) Median ser (µs) Median deser (µs) Ops/s (from mean) Median size (B) Samples Fidelity
avro:1.12.2 445 245 200 62.7K 9.03K 1823 1.00
cbor2:6.1.3 290 192 97.7 85.9K 13.6K 1800 1.00
cloudpickle:3.1.2 280 207 72.8 59.4K 13.6K 1823 1.00
dill:0.4.1 2,160 2,080 85.3 8.77K 13.6K 1781 1.00
flatbuffers:25.12.19 2,280 1,820 466 11.7K 18.7K 1853 1.00
json:python-3.14.0 307 178 128 73.5K 19.7K 1805 1.00
mashumaro:3.22 72.9 30.3 42.6 183K 19.7K 1803 1.00
msgpack:1.2.1 95.5 47.6 47.8 246K 13.6K 1767 1.00
msgspec:0.21.1 54.6 22.4 32 401K 14.7K 1816 1.00
msgspec-msgpack:0.21.1 34.7 11.5 23.2 477K 9.69K 1824 1.00
orjson:3.11.9 64.3 23.9 40.2 365K 19.7K 1802 1.00
pickle:python-3.14.0 172 99.3 72.2 96K 13.6K 1832 1.00
protobuf:7.35.1 27.4 11 16.4 499K 10.1K 1770 1.00
pydantic:2.13.4 487 252 235 66.5K 21.4K 1803 1.00
rapidjson:1.23 279 150 129 118K 19.7K 1854 1.00
serpyco-rs:1.20.0 71 29.7 41.2 212K 19.7K 1795 1.00

Total Time

serializer bytes mode/mean bytes mode/median stream mode/mean stream mode/median
avro:1.12.2 3.93 3.93 3.86 3.85
cbor2:6.1.3 3.05 3.05 3.19 3.17
cloudpickle:3.1.2 5.93 5.93 5.82 5.82
dill:0.4.1 34.7 34.6 34.4 34.5
flatbuffers:25.12.19 21.4 21.3 22 22
json:python-3.14.0 4.42 4.35 4.4 4.39
mashumaro:3.22 1.69 1.64 1.82 1.8
msgpack:1.2.1 1.24 1.24 1.5 1.49
msgspec:0.21.1 0.55 0.538 0.907 0.9
msgspec-msgpack:0.21.1 0.507 0.501 0.798 0.806
orjson:3.11.9 0.806 0.804 0.904 0.9
pickle:python-3.14.0 3.48 3.48 3.64 3.64
protobuf:7.35.1 0.643 0.634 0.749 0.747
pydantic:2.13.4 4.81 4.76 4.97 4.97
rapidjson:1.23 2.81 2.83 2.9 2.9
serpyco-rs:1.20.0 1.5 1.5 1.56 1.55

Ops/Sec

serializer Document · 1 instance Document · 100 instances Event · 1 instance Event · 100 instances Message · 1 instance Message · 100 instances Strings · 1 instance Strings · 100 instances Telemetry · 1 instance Telemetry · 100 instances
avro:1.12.2 61K 0.73K 100K 1.2K 0.25M 3.2K 88K 0.95K 0.12M 1.2K
cbor2:6.1.3 69K 0.86K 150K 1.8K 0.33M 5.1K 180K 2.3K 0.15M 1.8K
cloudpickle:3.1.2 48K 0.76K 69K 1.5K 0.17M 6.3K 140K 2.7K 0.16M 4.1K
dill:0.4.1 8K 0.11K 11K 0.22K 0.029M 0.79K 18K 0.3K 0.019M 0.32K
flatbuffers:25.12.19 11K 0.13K 19K 0.24K 0.047M 0.57K 15K 0.17K 0.025M 0.32K
json:python-3.14.0 100K 1.8K 170K 3.2K 0.23M 5.7K 170K 2.9K 0.054M 0.6K
mashumaro:3.22 170K 4.7K 320K 8.9K 0.59M 24K 470K 6.1K 0.3M 5.5K
msgpack:1.2.1 240K 2.6K 450K 5.9K 0.8M 12K 590K 6.8K 0.54M 6.8K
msgspec:0.21.1 710K 8.4K 880K 15K 1.8M 47K 710K 7.2K 0.42M 5K
msgspec-msgpack:0.21.1 810K 10K 950K 19K 2M 73K 710K 8.9K 0.89M 16K
orjson:3.11.9 530K 5.6K 780K 12K 1.2M 26K 770K 6.4K 0.46M 6.2K
pickle:python-3.14.0 96K 1.4K 130K 2.7K 0.29M 10K 220K 3.3K 0.22M 6K
protobuf:7.35.1 710K 12K 980K 20K 1.6M 68K 800K 9.9K 1.2M 41K
pydantic:2.13.4 71K 0.75K 120K 1.4K 0.21M 2.9K 180K 2K 0.087M 0.53K
rapidjson:1.23 170K 2.1K 280K 4.7K 0.36M 6.5K 320K 4K 0.056M 0.6K
serpyco-rs:1.20.0 250K 4.5K 380K 10K 0.67M 24K 510K 6K 0.33M 5.9K

Latency distributions

Each figure pairs mean bars (left: ser / deser mean µs, linear from 0) with split violins (right: full sample density, linear from 0). Top 5 serializers by mean total time per fixture (display only; tables list all). Provenance (fixture, CSV path, modes, n) is printed on each image.

Document · 1 instance

Document · 1 instance

Document · 100 instances

Document · 100 instances

Event · 1 instance

Event · 1 instance

Event · 100 instances

Event · 100 instances

Message · 1 instance

Message · 1 instance

Message · 100 instances

Message · 100 instances

Strings · 1 instance

Strings · 1 instance

Strings · 100 instances

Strings · 100 instances

Telemetry · 1 instance

Telemetry · 1 instance

Telemetry · 100 instances

Telemetry · 100 instances

Regenerate

Published snapshots are produced locally (not by GitHub Actions). After running benchmarks (each run creates a timestamped YYYY-MM-DD-HHMMSS.csv):

analyze-benchmarks              # all languages
analyze-benchmarks -l python   # this language only

That refreshes this language's results tables and latency distributions under docs/analysis/plots/violin/. The hub Benchmark Results is a static index and is not rewritten. Commit the updated results.md / plot paths as needed.

Run configuration (important)

Show host, seed, serializers, and source CSV

Key fields from the run sidecar (*.configs.json, or legacy *.environment.json). Full metric definitions: Metrics catalog. Optional blocks (dataset, serializers) appear only when captured.

  • Source CSV: /home/leo/PycharmProjects/GLD/seriailizer-benchmark/logs/python/2026-07-10-162401.csv
  • run=2026-07-10-162401
  • language=python
  • os=Linux 6.8.0-124-generic
  • cpu=12th Gen Intel(R) Core(TM) i7-12800H (20 threads)
  • ram=31.0 GiB
  • runtimes: python=3.14.0, node=24.15.0, dotnet=8.0.422
  • git=995336e dirty
  • seed=42
  • warmup_reps=1
  • serializers=16
  • metrics_profile=multi_way
  • Fixtures (config): message, document, telemetry, strings, event
  • Serializers (from CSV):
  • avro @ 1.12.2
  • cbor2 @ 6.1.3
  • cloudpickle @ 3.1.2
  • dill @ 0.4.1
  • flatbuffers @ 25.12.19
  • json @ python-3.14.0
  • mashumaro @ 3.22
  • msgpack @ 1.2.1
  • msgspec @ 0.21.1
  • msgspec-msgpack @ 0.21.1
  • orjson @ 3.11.9
  • pickle @ python-3.14.0
  • protobuf @ 7.35.1
  • pydantic @ 2.13.4
  • rapidjson @ 1.23
  • serpyco-rs @ 1.20.0