Home

Awesome

<!-- AUTOMATICALLY GENERATED, DO NOT EDIT --> <!-- edit README.md.template instead -->

Rust serialization benchmark

The goal of these benchmarks is to provide thorough and complete benchmarks for various rust serialization frameworks.

These benchmarks are a work in progress

These benchmarks are still being developed and pull requests to improve benchmarks are welcome.

Interactive site

Calculate the number of messages per second that can be sent/received with various rust serialization frameworks and compression libraries. Documentation

Format

All tests benchmark the following properties (time or size):

Zero-copy deserialization libraries have an additional set of benchmarks:

Some benchmark results may be italicized and followed by an asterisk. Mouse over these for more details on what situation was benchmarked. Other footnotes are located at the bottom.

Last updated: 2024-9-17 2:50:58

<details><summary>Runtime info</summary>

rustc version

rustc 1.83.0-nightly (c52c23b6f 2024-09-16)
binary: rustc
commit-hash: c52c23b6f44cd19718721a5e3b2eeb169e9c96ff
commit-date: 2024-09-16
host: x86_64-unknown-linux-gnu
release: 1.83.0-nightly
LLVM version: 19.1.0

CPU info

Architecture:                       x86_64
CPU op-mode(s):                     32-bit, 64-bit
Address sizes:                      48 bits physical, 48 bits virtual
Byte Order:                         Little Endian
CPU(s):                             4
On-line CPU(s) list:                0-3
Vendor ID:                          AuthenticAMD
Model name:                         AMD EPYC 7763 64-Core Processor
CPU family:                         25
Model:                              1
Thread(s) per core:                 2
Core(s) per socket:                 2
Socket(s):                          1
Stepping:                           1
BogoMIPS:                           4890.85
Flags:                              fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat npt nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload umip vaes vpclmulqdq rdpid fsrm
Virtualization:                     AMD-V
Hypervisor vendor:                  Microsoft
Virtualization type:                full
L1d cache:                          64 KiB (2 instances)
L1i cache:                          64 KiB (2 instances)
L2 cache:                           1 MiB (2 instances)
L3 cache:                           32 MiB (1 instance)
NUMA node(s):                       1
NUMA node0 CPU(s):                  0-3
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit:        Not affected
Vulnerability L1tf:                 Not affected
Vulnerability Mds:                  Not affected
Vulnerability Meltdown:             Not affected
Vulnerability Mmio stale data:      Not affected
Vulnerability Retbleed:             Not affected
Vulnerability Spec rstack overflow: Vulnerable: Safe RET, no microcode
Vulnerability Spec store bypass:    Vulnerable
Vulnerability Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:           Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected
</details>

log

This data set is composed of HTTP request logs that are small and contain many strings.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1010.0<span title="encode">696.30 µs*</span> <span title="prepend">627.02 µs*</span>3.2225 ms8746323554463117235.9176 ms
bincode 2.0.0-rc327.62 µs2.7430 ms7412953039442571533.9956 ms
bincode 1.3.3522.15 µs2.3722 ms10457843731273117614.9219 ms
bitcode 0.6.3146.14 µs1.4838 ms7037102888262297552.4565 ms
borsh 1.5.1545.86 µs2.1871 ms8857803622042865144.5638 ms
capnp 0.19.7478.98 µs14432165139864286496.8509 ms
cbor4ii 0.3.3595.77 µs5.2779 ms14078354034403240814.9208 ms
ciborium 0.2.24.3400 ms12.113 ms14078354034403240814.8952 ms
databuf 0.5.0255.15 µs2.0632 ms7657783117152646304.1894 ms
dlhn 0.1.7711.81 µs2.8752 ms7249533014462536293.8404 ms
flatbuffers 24.3.251.0259 ms12763684685393888325.5752 ms
msgpacker 0.4.3943.65 µs2.7212 ms7649963152912648984.2210 ms
nachricht-serde 0.4.05.8087 ms4.5676 ms8186693325562855144.6654 ms
nanoserde 0.1.37261.02 µs2.0712 ms10457843731273117614.5550 ms
parity-scale-codec 3.6.12657.11 µs2.2587 ms7657783117432645183.9943 ms
postcard 1.0.10398.35 µs2.1727 ms7249533023992537473.6706 ms
pot 3.0.12.3759 ms6.8393 ms9719223725133041225.0875 ms
prost 0.13.2<span title="encode">951.17 µs*</span> <span title="populate + encode">2.5158 ms*</span>3.3263 ms8846283631303154944.9086 ms
rkyv 0.8.5243.10 µs<span title="unvalidated">1.5883 ms*</span> <span title="validated upfront with error">2.1743 ms*</span>10114883935263265175.3054 ms
rmp-serde 1.3.01.3409 ms3.1621 ms7849973253842782194.2725 ms
ron 0.8.111.389 ms14.878 ms16074594491583497135.7919 ms
savefile 0.17.7189.56 µs2.8373 ms10458003731403117774.5761 ms
serde_bare 0.5.0694.93 µs2.1020 ms7657783117152646303.8792 ms
serde_cbor 0.11.21.9622 ms4.9327 ms14078354034403240814.8214 ms
serde_json 1.0.1283.8112 ms5.5805 ms18274614705603610905.6848 ms
simd-json 0.13.102.1634 ms4.6308 ms18274614705603610905.6499 ms
speedy 0.8.7204.20 µs1.7854 ms8857803622042865144.2299 ms
wiring 0.2.2190.75 µs1.9875 ms10457843379302761883.9679 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp 0.19.7<span title="validated on-demand with error">72.554 ns*</span><span title="validated on-demand with error">167.55 µs*</span>
flatbuffers 24.3.25<span title="unvalidated">2.4730 ns*</span> <span title="validated upfront with error">1.9811 ms*</span><span title="unvalidated">51.742 µs*</span> <span title="validated upfront with error">2.0308 ms*</span>
rkyv 0.8.5<span title="unvalidated">1.2369 ns*</span> <span title="validated upfront with error">591.11 µs*</span><span title="unvalidated">10.332 µs*</span> <span title="validated upfront with error">601.85 µs*</span><span title="unvalidated">7.7403 µs*</span>

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1010.0<span title="encode">20.99%*</span> <span title="prepend">23.31%*</span>46.04%80.46%81.26%73.70%41.51%
bincode 2.0.0-rc44.61%54.09%94.93%95.03%89.35%61.48%
bincode 1.3.327.99%62.55%67.29%77.41%73.70%49.91%
bitcode 0.6.3100.00%100.00%100.00%100.00%100.00%100.00%
borsh 1.5.126.77%67.84%79.45%79.74%80.19%53.83%
capnp 0.19.730.51%48.76%56.19%53.60%35.86%
cbor4ii 0.3.324.53%28.11%49.99%71.59%70.89%49.92%
ciborium 0.2.23.37%12.25%49.99%71.59%70.89%50.18%
databuf 0.5.057.28%71.92%91.89%92.66%86.82%58.64%
dlhn 0.1.720.53%51.61%97.07%95.81%90.59%63.96%
flatbuffers 24.3.2514.25%55.13%61.64%59.09%44.06%
msgpacker 0.4.315.49%54.53%91.99%91.61%86.73%58.20%
nachricht-serde 0.4.02.52%32.49%85.96%86.85%80.47%52.65%
nanoserde 0.1.3755.99%71.64%67.29%77.41%73.70%53.93%
parity-scale-codec 3.6.1222.24%65.69%91.89%92.65%86.86%61.50%
postcard 1.0.1036.69%68.29%97.07%95.51%90.54%66.92%
pot 3.0.16.15%21.70%72.40%77.53%75.55%48.29%
prost 0.13.2<span title="encode">15.36%*</span> <span title="populate + encode">5.81%*</span>44.61%79.55%79.54%72.82%50.04%
rkyv 0.8.560.12%<span title="unvalidated">93.42%*</span> <span title="validated upfront with error">68.24%*</span>69.57%73.39%70.37%46.30%
rmp-serde 1.3.010.90%46.92%89.64%88.76%82.58%57.50%
ron 0.8.11.28%9.97%43.78%64.30%65.70%42.41%
savefile 0.17.777.09%52.30%67.29%77.40%73.69%53.68%
serde_bare 0.5.021.03%70.59%91.89%92.66%86.82%63.32%
serde_cbor 0.11.27.45%30.08%49.99%71.59%70.89%50.95%
serde_json 1.0.1283.83%26.59%38.51%61.38%63.63%43.21%
simd-json 0.13.106.76%32.04%38.51%61.38%63.63%43.48%
speedy 0.8.771.57%83.11%79.45%79.74%80.19%58.07%
wiring 0.2.276.61%74.66%67.29%85.47%83.19%61.91%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp 0.19.7<span title="validated on-demand with error">1.70%*</span><span title="validated on-demand with error">6.17%*</span>
flatbuffers 24.3.25<span title="unvalidated">50.02%*</span> <span title="validated upfront with error">0.00%*</span><span title="unvalidated">19.97%*</span> <span title="validated upfront with error">0.51%*</span>
rkyv 0.8.5<span title="unvalidated">100.00%*</span> <span title="validated upfront with error">0.00%*</span><span title="unvalidated">100.00%*</span> <span title="validated upfront with error">1.72%*</span><span title="unvalidated">100.00%*</span>

mesh

This data set is a single mesh. The mesh contains an array of triangles, each of which has three vertices and a normal vector.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1010.0<span title="encode">6.6861 ms*</span> <span title="prepend">8.7410 ms*</span>9.1053 ms86250056443961623157270.340 ms
bincode 2.0.0-rc2.3960 ms1.0187 ms6000005537849753458977.4417 ms
bincode 1.3.35.1944 ms4.8484 ms6000008537850053458907.6828 ms
bitcode 0.6.31.4137 ms810.24 µs60000065182295492388012.973 ms
borsh 1.5.16.0069 ms4.2985 ms6000004537849653458897.4086 ms
capnp 0.19.75.8357 ms140000887130367605106281.231 ms
cbor4ii 0.3.39.8444 ms47.813 ms131250167524114675796792.802 ms
ciborium 0.2.266.080 ms117.85 ms131223247524660675965893.222 ms
databuf 0.5.02.3956 ms5.3056 ms6000003537849553459007.4623 ms
dlhn 0.1.75.8545 ms8.6152 ms6000003537849553459007.5253 ms
flatbuffers 24.3.25875.69 µs6000024537843453459107.4619 ms
msgpacker 0.4.32.0967 ms4.9552 ms7500005605844260143379.5418 ms
nachricht-serde 0.4.0129.35 ms30.905 ms81250376493484638694068.601 ms
nanoserde 0.1.371.4626 ms1.1056 ms6000008537850053458907.4216 ms
parity-scale-codec 3.6.124.7459 ms4.0426 ms6000004537849653458897.5883 ms
postcard 1.0.10489.15 µs1.3439 ms6000003537849553459007.4920 ms
pot 3.0.140.466 ms73.252 ms101223426814618685225184.290 ms
prost 0.13.2<span title="encode">7.7218 ms*</span> <span title="populate + encode">8.5504 ms*</span>12.166 ms87500006665735642187170.330 ms
rkyv 0.8.5258.31 µs<span title="unvalidated">197.34 µs*</span> <span title="validated upfront with error">197.43 µs*</span>6000008537850053458927.5712 ms
rmp-serde 1.3.015.256 ms18.012 ms81250066494876639103767.462 ms
ron 0.8.1168.81 ms226.14 ms2219288589703958138755149.77 ms
savefile 0.17.7258.63 µs258.66 µs6000024537851353458937.4224 ms
serde_bare 0.5.06.4722 ms4.0653 ms6000003537849553459007.4078 ms
serde_cbor 0.11.233.845 ms46.538 ms131223247524660675965892.784 ms
serde_json 1.0.12886.365 ms87.482 ms2619288395660848586741154.09 ms
simd-json 0.13.1052.315 ms72.231 ms2619288395660848586741154.05 ms
speedy 0.8.7258.56 µs258.73 µs6000004537849653458897.5257 ms
wiring 0.2.2197.53 µs352.47 µs6000008537895253458947.6508 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp 0.19.7<span title="validated on-demand with error">105.40 ns*</span><span title="validated on-demand with error">2.2050 ms*</span>
flatbuffers 24.3.25<span title="unvalidated">2.4743 ns*</span> <span title="validated upfront with error">39.646 ns*</span><span title="unvalidated">54.208 µs*</span> <span title="validated upfront with error">77.487 µs*</span>
rkyv 0.8.5<span title="unvalidated">1.2367 ns*</span> <span title="validated upfront with error">4.6464 ns*</span><span title="unvalidated">48.411 µs*</span> <span title="validated upfront with error">38.742 µs*</span><span title="unvalidated">99.753 µs*</span>

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1010.0<span title="encode">2.95%*</span> <span title="prepend">2.26%*</span>2.17%69.57%80.42%79.02%10.53%
bincode 2.0.0-rc8.24%19.37%100.00%96.35%92.11%99.54%
bincode 1.3.33.80%4.07%100.00%96.35%92.11%96.42%
bitcode 0.6.313.97%24.36%100.00%100.00%100.00%57.10%
borsh 1.5.13.29%4.59%100.00%96.35%92.11%99.99%
capnp 0.19.73.38%42.86%72.68%81.37%9.12%
cbor4ii 0.3.32.01%0.41%45.71%68.88%72.86%7.98%
ciborium 0.2.20.30%0.17%45.72%68.87%72.84%7.95%
databuf 0.5.08.25%3.72%100.00%96.35%92.11%99.27%
dlhn 0.1.73.37%2.29%100.00%96.35%92.11%98.44%
flatbuffers 24.3.2522.56%100.00%96.35%92.11%99.27%
msgpacker 0.4.39.42%3.98%80.00%85.54%81.87%77.64%
nachricht-serde 0.4.00.15%0.64%73.85%79.81%77.09%10.80%
nanoserde 0.1.3713.51%17.85%100.00%96.35%92.11%99.81%
parity-scale-codec 3.6.124.16%4.88%100.00%96.35%92.11%97.62%
postcard 1.0.1040.38%14.68%100.00%96.35%92.11%98.88%
pot 3.0.10.49%0.27%59.27%76.05%71.86%8.79%
prost 0.13.2<span title="encode">2.56%*</span> <span title="populate + encode">2.31%*</span>1.62%68.57%77.75%76.67%10.53%
rkyv 0.8.576.47%<span title="unvalidated">100.00%*</span> <span title="validated upfront with error">99.95%*</span>100.00%96.35%92.11%97.84%
rmp-serde 1.3.01.29%1.10%73.85%79.79%77.04%10.98%
ron 0.8.10.12%0.09%27.04%57.77%60.50%4.95%
savefile 0.17.776.38%76.29%100.00%96.35%92.11%99.80%
serde_bare 0.5.03.05%4.85%100.00%96.35%92.11%100.00%
serde_cbor 0.11.20.58%0.42%45.72%68.87%72.84%7.98%
serde_json 1.0.1280.23%0.23%22.91%54.17%57.34%4.81%
simd-json 0.13.100.38%0.27%22.91%54.17%57.34%4.81%
speedy 0.8.776.40%76.27%100.00%96.35%92.11%98.43%
wiring 0.2.2100.00%55.99%100.00%96.34%92.11%96.82%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp 0.19.7<span title="validated on-demand with error">1.17%*</span><span title="validated on-demand with error">1.76%*</span>
flatbuffers 24.3.25<span title="unvalidated">49.98%*</span> <span title="validated upfront with error">3.12%*</span><span title="unvalidated">71.47%*</span> <span title="validated upfront with error">50.00%*</span>
rkyv 0.8.5<span title="unvalidated">100.00%*</span> <span title="validated upfront with error">26.62%*</span><span title="unvalidated">80.03%*</span> <span title="validated upfront with error">100.00%*</span><span title="unvalidated">100.00%*</span>

minecraft_savedata

This data set is composed of Minecraft player saves that contain highly structured data.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1010.0<span title="encode">926.62 µs*</span> <span title="prepend">840.37 µs*</span>3.1952 ms4893482811732495463.0782 ms
bincode 2.0.0-rc303.41 µs2.1171 ms3674132212912062732.4782 ms
bincode 1.3.3596.82 µs1.8650 ms5699752405252324232.9188 ms
bitcode 0.6.3133.89 µs1.2710 ms327688200947182736749.67 µs
borsh 1.5.1518.11 µs1.8416 ms4465952342362100082.4672 ms
capnp 0.19.7476.19 µs8038963356062808513.9121 ms
cbor4ii 0.3.3786.05 µs4.6978 ms11098313447452745143.8789 ms
ciborium 0.2.23.8069 ms10.319 ms11098213447512745263.8492 ms
databuf 0.5.0302.01 µs1.7295 ms3563112130621984882.3832 ms
dlhn 0.1.7769.97 µs2.6426 ms3664962206002056832.4684 ms
flatbuffers 24.3.253.2657 ms8441683456962940153.8239 ms
msgpacker 0.4.3705.01 µs2.8260 ms3912512368772204762.6182 ms
nachricht-serde 0.4.05.4630 ms3.8996 ms4497452524322311102.7578 ms
nanoserde 0.1.37261.40 µs1.9023 ms5679752399302324192.8706 ms
parity-scale-codec 3.6.12614.86 µs2.0959 ms3563112129761985242.3974 ms
postcard 1.0.10446.84 µs2.0228 ms3674892219132073442.4842 ms
pot 3.0.12.3896 ms6.2034 ms5991252991582476933.1954 ms
prost 0.13.2<span title="encode">1.2594 ms*</span> <span title="populate + encode">2.9066 ms*</span>3.4984 ms5968113053192693103.4975 ms
rkyv 0.8.5346.04 µs<span title="unvalidated">1.5295 ms*</span> <span title="validated upfront with error">2.0385 ms*</span>6037762547762200872.7585 ms
rmp-serde 1.3.01.4175 ms3.0097 ms4245332452142261882.7246 ms
ron 0.8.17.1574 ms16.991 ms14652234349353433385.9812 ms
savefile 0.17.7205.85 µs1.8438 ms5669912393612320132.8602 ms
serde_bare 0.5.0712.59 µs2.3776 ms3563112130621984882.4120 ms
serde_cbor 0.11.21.8081 ms4.7379 ms11098213447512745263.8515 ms
serde_json 1.0.1283.6719 ms6.4289 ms16231914665273596236.0749 ms
simd-json 0.13.102.2279 ms4.5460 ms16231914665273596236.0855 ms
speedy 0.8.7278.90 µs1.5939 ms4495952349702103612.5436 ms
wiring 0.2.2222.12 µs1.8121 ms5669752478102252592.9275 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp 0.19.7<span title="validated on-demand with error">72.463 ns*</span><span title="validated on-demand with error">424.88 ns*</span>
flatbuffers 24.3.25<span title="unvalidated">2.4781 ns*</span> <span title="validated upfront with error">2.1849 ms*</span><span title="unvalidated">1.3575 µs*</span> <span title="validated upfront with error">2.2118 ms*</span>
rkyv 0.8.5<span title="unvalidated">1.2371 ns*</span> <span title="validated upfront with error">500.73 µs*</span><span title="unvalidated">163.21 ns*</span> <span title="validated upfront with error">500.39 µs*</span><span title="unvalidated">775.85 ns*</span>

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1010.0<span title="encode">14.45%*</span> <span title="prepend">15.93%*</span>39.78%66.96%71.47%73.23%24.35%
bincode 2.0.0-rc44.13%60.03%89.19%90.81%88.59%30.25%
bincode 1.3.322.43%68.15%57.49%83.55%78.62%25.68%
bitcode 0.6.3100.00%100.00%100.00%100.00%100.00%100.00%
borsh 1.5.125.84%69.02%73.37%85.79%87.01%30.39%
capnp 0.19.728.12%40.76%59.88%65.07%19.16%
cbor4ii 0.3.317.03%27.06%29.53%58.29%66.57%19.33%
ciborium 0.2.23.52%12.32%29.53%58.29%66.56%19.48%
databuf 0.5.044.33%73.49%91.97%94.31%92.06%31.46%
dlhn 0.1.717.39%48.10%89.41%91.09%88.84%30.37%
flatbuffers 24.3.254.10%38.82%58.13%62.15%19.60%
msgpacker 0.4.318.99%44.98%83.75%84.83%82.88%28.63%
nachricht-serde 0.4.02.45%32.59%72.86%79.60%79.07%27.18%
nanoserde 0.1.3751.22%66.81%57.69%83.75%78.62%26.12%
parity-scale-codec 3.6.1221.78%60.64%91.97%94.35%92.05%31.27%
postcard 1.0.1029.96%62.83%89.17%90.55%88.13%30.18%
pot 3.0.15.60%20.49%54.69%67.17%73.78%23.46%
prost 0.13.2<span title="encode">10.63%*</span> <span title="populate + encode">4.61%*</span>36.33%54.91%65.82%67.85%21.43%
rkyv 0.8.538.69%<span title="unvalidated">83.10%*</span> <span title="validated upfront with error">62.35%*</span>54.27%78.87%83.03%27.18%
rmp-serde 1.3.09.45%42.23%77.19%81.95%80.79%27.52%
ron 0.8.11.87%7.48%22.36%46.20%53.22%12.53%
savefile 0.17.765.04%68.93%57.79%83.95%78.76%26.21%
serde_bare 0.5.018.79%53.46%91.97%94.31%92.06%31.08%
serde_cbor 0.11.27.41%26.83%29.53%58.29%66.56%19.46%
serde_json 1.0.1283.65%19.77%20.19%43.07%50.81%12.34%
simd-json 0.13.106.01%27.96%20.19%43.07%50.81%12.32%
speedy 0.8.748.01%79.74%72.89%85.52%86.87%29.47%
wiring 0.2.260.28%70.14%57.80%81.09%81.12%25.61%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp 0.19.7<span title="validated on-demand with error">1.71%*</span><span title="validated on-demand with error">38.41%*</span>
flatbuffers 24.3.25<span title="unvalidated">49.92%*</span> <span title="validated upfront with error">0.00%*</span><span title="unvalidated">12.02%*</span> <span title="validated upfront with error">0.01%*</span>
rkyv 0.8.5<span title="unvalidated">100.00%*</span> <span title="validated upfront with error">0.00%*</span><span title="unvalidated">100.00%*</span> <span title="validated upfront with error">0.03%*</span><span title="unvalidated">100.00%*</span>

mk48

This data set is composed of mk48.io game updates that contain data with many exploitable patterns and invariants.

Raw data

For operations, time per iteration; for size, bytes. Lower is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1010.0<span title="encode">4.6437 ms*</span> <span title="prepend">2.4776 ms*</span>8.5670 ms16644281264167121647210.967 ms
bincode 2.0.0-rc1.1938 ms4.0660 ms1372381109148610372968.9313 ms
bincode 1.3.33.5734 ms4.2899 ms1811011111528110256279.8752 ms
bitcode 0.6.3709.45 µs2.3099 ms9484998573218376583.0476 ms
borsh 1.5.12.8702 ms2.8592 ms1486162108235710135509.4805 ms
capnp 0.19.72.3754 ms26640401511895121208713.837 ms
cbor4ii 0.3.33.2689 ms17.251 ms58787911655835143139020.705 ms
ciborium 0.2.222.529 ms56.529 ms58786531655791143156021.485 ms
databuf 0.5.01.2579 ms4.0254 ms128825710375799843378.4869 ms
dlhn 0.1.74.7265 ms7.7631 ms1279599105206110211618.1670 ms
flatbuffers 24.3.255.3193 ms22737401408408123556612.655 ms
msgpacker 0.4.31.6126 ms6.2763 ms1424043112875811101569.1673 ms
nachricht-serde 0.4.030.081 ms17.321 ms17285191247642123332312.463 ms
nanoserde 0.1.371.2712 ms2.8730 ms1770477110830410299479.9180 ms
parity-scale-codec 3.6.122.9800 ms3.7833 ms128825710392699865108.4109 ms
postcard 1.0.102.0733 ms4.1699 ms1279599105824310167388.3081 ms
pot 3.0.113.843 ms31.587 ms25448101447453126839015.334 ms
prost 0.13.2<span title="encode">5.2988 ms*</span> <span title="populate + encode">9.1610 ms*</span>8.4523 ms18183781307777126631111.539 ms
rkyv 0.8.5904.02 µs<span title="unvalidated">2.1523 ms*</span> <span title="validated upfront with error">2.5731 ms*</span>20290801351984118399012.349 ms
rmp-serde 1.3.09.9240 ms11.401 ms17038131231892120020811.004 ms
ron 0.8.136.830 ms87.014 ms84762842181196178397133.706 ms
savefile 0.17.7800.62 µs2.9594 ms1750226110168210278289.7791 ms
serde_bare 0.5.04.7583 ms4.9962 ms128825710375979843568.5924 ms
serde_cbor 0.11.29.4197 ms20.736 ms58786531655791143156020.822 ms
serde_json 1.0.12820.031 ms29.215 ms91755942334253180071334.056 ms
simd-json 0.13.1011.410 ms26.500 ms91755942334253180071335.277 ms
speedy 0.8.7708.74 µs2.4172 ms1546963109353210134439.5776 ms
wiring 0.2.2691.52 µs2.7131 ms17502101129857105890610.159 ms

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp 0.19.7<span title="validated on-demand with error">72.523 ns*</span><span title="validated on-demand with error">709.61 ns*</span>
flatbuffers 24.3.25<span title="unvalidated">2.4749 ns*</span> <span title="validated upfront with error">5.0178 ms*</span><span title="unvalidated">2.6273 µs*</span> <span title="validated upfront with error">5.0853 ms*</span>
rkyv 0.8.5<span title="unvalidated">1.2372 ns*</span> <span title="validated upfront with error">425.37 µs*</span><span title="unvalidated">424.35 ns*</span> <span title="validated upfront with error">429.22 µs*</span><span title="unvalidated">234.83 ns*</span>

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

CrateSerializeDeserializeSizeZlibZstdZstd Time
bilrost 0.1010.0<span title="encode">14.89%*</span> <span title="prepend">27.91%*</span>25.12%56.99%67.82%68.86%27.79%
bincode 2.0.0-rc57.93%52.93%69.11%78.55%80.75%34.12%
bincode 1.3.319.35%50.17%52.37%76.87%81.67%30.86%
bitcode 0.6.397.47%93.18%100.00%100.00%100.00%100.00%
borsh 1.5.124.09%75.28%63.82%79.21%82.65%32.15%
capnp 0.19.729.11%35.60%56.71%69.11%22.03%
cbor4ii 0.3.321.15%12.48%16.13%51.78%58.52%14.72%
ciborium 0.2.23.07%3.81%16.13%51.78%58.51%14.18%
databuf 0.5.054.97%53.47%73.63%82.63%85.10%35.91%
dlhn 0.1.714.63%27.72%74.12%81.49%82.03%37.32%
flatbuffers 24.3.2513.00%41.72%60.87%67.80%24.08%
msgpacker 0.4.342.88%34.29%66.61%75.95%75.45%33.24%
nachricht-serde 0.4.02.30%12.43%54.87%68.72%67.92%24.45%
nanoserde 0.1.3754.40%74.91%53.57%77.35%81.33%30.73%
parity-scale-codec 3.6.1223.21%56.89%73.63%82.49%84.91%36.23%
postcard 1.0.1033.35%51.62%74.12%81.01%82.39%36.68%
pot 3.0.15.00%6.81%37.27%59.23%66.04%19.88%
prost 0.13.2<span title="encode">13.05%*</span> <span title="populate + encode">7.55%*</span>25.46%52.16%65.56%66.15%26.41%
rkyv 0.8.576.49%<span title="unvalidated">100.00%*</span> <span title="validated upfront with error">83.65%*</span>46.75%63.41%70.75%24.68%
rmp-serde 1.3.06.97%18.88%55.67%69.59%69.79%27.70%
ron 0.8.11.88%2.47%11.19%39.31%46.95%9.04%
savefile 0.17.786.37%72.73%54.19%77.82%81.50%31.16%
serde_bare 0.5.014.53%43.08%73.63%82.63%85.10%35.47%
serde_cbor 0.11.27.34%10.38%16.13%51.78%58.51%14.64%
serde_json 1.0.1283.45%7.37%10.34%36.73%46.52%8.95%
simd-json 0.13.106.06%8.12%10.34%36.73%46.52%8.64%
speedy 0.8.797.57%89.04%61.31%78.40%82.65%31.82%
wiring 0.2.2100.00%79.33%54.19%75.88%79.11%30.00%

Zero-copy deserialization speed

CrateAccessReadUpdate
capnp 0.19.7<span title="validated on-demand with error">1.71%*</span><span title="validated on-demand with error">59.80%*</span>
flatbuffers 24.3.25<span title="unvalidated">49.99%*</span> <span title="validated upfront with error">0.00%*</span><span title="unvalidated">16.15%*</span> <span title="validated upfront with error">0.01%*</span>
rkyv 0.8.5<span title="unvalidated">100.00%*</span> <span title="validated upfront with error">0.00%*</span><span title="unvalidated">100.00%*</span> <span title="validated upfront with error">0.10%*</span><span title="unvalidated">100.00%*</span>

Footnotes:

* mouse over for situational details

do not provide deserialization capabilities, but the user can write their own

do not support buffer mutation (capnp and flatbuffers may but not for rust)