Skip to content

Instantly share code, notes, and snippets.

@jamesmunns
Created May 13, 2022 18:24
Show Gist options
  • Save jamesmunns/768d26acdc3ab4f92a3b3c8a4ba1c30f to your computer and use it in GitHub Desktop.
Save jamesmunns/768d26acdc3ab4f92a3b3c8a4ba1c30f to your computer and use it in GitHub Desktop.

No LTO

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

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 558.19 us 2.9227 ms 765778 312739 264630
postcard-all-varints 466.82 us 2.9672 ms 724953 303462 253747
postcard-rework-flavors 480.28 us 2.6557 ms 724953 303462 253747

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 83.63% 90.86% 94.67% 97.03% 95.89%
postcard-all-varints 100.00% 89.50% 100.00% 100.00% 100.00%
postcard-rework-flavors 97.20% 100.00% 100.00% 100.00% 100.00%

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

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 5.1696 ms 6.7710 ms 6000003 5380817 5345900
postcard-all-varints 1.2420 ms 6.8822 ms 6000003 5380817 5345900
postcard-rework-flavors 1.2068 ms 2.8660 ms 6000003 5380817 5345900

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 23.34% 42.33% 100.00% 100.00% 100.00%
postcard-all-varints 97.17% 41.64% 100.00% 100.00% 100.00%
postcard-rework-flavors 100.00% 100.00% 100.00% 100.00% 100.00%

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

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 579.18 us 2.4312 ms 356311 213270 198488
postcard-all-varints 458.84 us 2.5491 ms 367489 222144 207344
postcard-rework-flavors 415.17 us 2.2077 ms 367489 222144 207344

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 71.68% 90.81% 100.00% 100.00% 100.00%
postcard-all-varints 90.48% 86.61% 96.96% 96.01% 95.73%
postcard-rework-flavors 100.00% 100.00% 96.96% 96.01% 95.73%

LTO

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

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 305.10 us 2.5064 ms 765778 312739 264630
postcard-all-varints 392.30 us 2.5671 ms 724953 303462 253747
postcard-rework-flavors 403.56 us 2.5302 ms 724953 303462 253747

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 100.00% 100.00% 94.67% 97.03% 95.89%
postcard-all-varints 77.77% 97.64% 100.00% 100.00% 100.00%
postcard-rework-flavors 75.60% 99.06% 100.00% 100.00% 100.00%

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

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 1.6137 ms 2.8647 ms 6000003 5380817 5345900
postcard-all-varints 1.6217 ms 2.9097 ms 6000003 5380817 5345900
postcard-rework-flavors 769.18 us 1.0864 ms 6000003 5380817 5345900

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 47.67% 37.92% 100.00% 100.00% 100.00%
postcard-all-varints 47.43% 37.34% 100.00% 100.00% 100.00%
postcard-rework-flavors 100.00% 100.00% 100.00% 100.00% 100.00%

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

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 367.93 us 2.1944 ms 356311 213270 198488
postcard-all-varints 432.95 us 2.2090 ms 367489 222144 207344
postcard-rework-flavors 409.76 us 2.0979 ms 367489 222144 207344

Comparison

Relative to best. Higher is better.

Serialize / deserialize speed and size

Format / Lib Serialize Deserialize Size Zlib Zstd
postcard 100.00% 95.60% 100.00% 100.00% 100.00%
postcard-all-varints 84.98% 94.97% 96.96% 96.01% 95.73%
postcard-rework-flavors 89.79% 100.00% 96.96% 96.01% 95.73%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment