You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std::vector<double> 10K elements (100,000 iterations)
Metric
JSON
BEVE
MessagePack
CBOR
Protobuf
Message Size
219.02 KB
78.13 KB
87.89 KB
78.13 KB
78.13 KB
Write Throughput
1.14 GB/s
61.23 GB/s
3.94 GB/s
61.77 GB/s
33.20 GB/s
Read Throughput
1.17 GB/s
61.34 GB/s
1.83 GB/s
61.56 GB/s
39.80 GB/s
std::vector<float> 10K elements (100,000 iterations)
Metric
JSON
BEVE
MessagePack
CBOR
Protobuf
Message Size
124.11 KB
39.07 KB
48.83 KB
39.07 KB
39.07 KB
Write Throughput
846 MB/s
59.05 GB/s
2.23 GB/s
62.08 GB/s
32.05 GB/s
Read Throughput
821 MB/s
59.81 GB/s
1.01 GB/s
60.01 GB/s
39.90 GB/s
std::vector<uint64_t> 10K elements (100,000 iterations)
Metric
JSON
BEVE
MessagePack
CBOR
Protobuf
Message Size
199.23 KB
78.13 KB
87.89 KB
78.13 KB
78.13 KB
Write Throughput
3.45 GB/s
61.67 GB/s
3.87 GB/s
61.13 GB/s
31.83 GB/s
Read Throughput
1.83 GB/s
61.53 GB/s
1.90 GB/s
61.77 GB/s
35.97 GB/s
std::vector<uint32_t> 10K elements (100,000 iterations)
Metric
JSON
BEVE
MessagePack
CBOR
Protobuf
Message Size
104.97 KB
39.07 KB
48.83 KB
39.07 KB
39.07 KB
Write Throughput
3.09 GB/s
61.93 GB/s
2.27 GB/s
60.78 GB/s
32.77 GB/s
Read Throughput
1.83 GB/s
60.43 GB/s
1.05 GB/s
60.60 GB/s
39.26 GB/s
std::vector<uint16_t> 10K elements (100,000 iterations)
Metric
JSON
BEVE
MessagePack
CBOR
Protobuf
Message Size
56.96 KB
19.53 KB
29.26 KB
19.54 KB
19.54 KB
Write Throughput
1.97 GB/s
61.82 GB/s
1.37 GB/s
63.10 GB/s
33.90 GB/s
Read Throughput
1.53 GB/s
68.72 GB/s
627 MB/s
76.31 GB/s
43.41 GB/s
Analysis
Why BEVE and CBOR (Glaze) Excel at Numeric Arrays
Both BEVE and CBOR (via Glaze) store contiguous arrays of trivially copyable types as raw memory blocks, enabling efficient memcpy operations. This results in throughput exceeding 60 GB/s for typed arrays.
MessagePack encodes each element individually with type tags, resulting in significant overhead for numeric data.
Protobuf (via zpp_bits) also uses memcpy for packed repeated fields, but has additional overhead from varint length prefixes, field tags, and struct conversion between native C++ types and protobuf-compatible types.
Message Size Efficiency
Protobuf achieves the smallest size for complex objects (344 B) due to field tag encoding and varint integers
BEVE and CBOR achieve identical sizes for typed arrays via raw memory storage
MessagePack has ~12% overhead for typed arrays due to per-element type tags
Building
Note: msgpack-c is expected to be in the same directory as this repository on the branch cpp_master.