Runtime benchmarks.
Inspect OmniBuf against Protobuf, JSON, and native serializers in each of the 11 supported languages, or compare runtimes side by side on the same Apple M1 Pro workload.
Unpacking and reading all 11 fields of PeerUpdate into a destination struct and checksum sink across every codec.
Note: Cross-language latency reflects each runtime model (AOT native, JIT, interpreter + Rust FFI/NIF, or BEAM). Click any row's All 6 → button to inspect all competitors and pure-language variants for that ecosystem.
Serializing the 11-field PeerUpdate struct into a byte buffer. Tests single-pass 2-byte length slots and Prefix-Varint writes.
Note: Cross-language latency reflects each runtime model (AOT native, JIT, interpreter + Rust FFI/NIF, or BEAM). Click any row's All 6 → button to inspect all competitors and pure-language variants for that ecosystem.
Extracting a single nested city string directly from raw wire bytes by hopping over preceding fields by byte length.
Note: Cross-language latency reflects each runtime model (AOT native, JIT, interpreter + Rust FFI/NIF, or BEAM). Click any row's All 6 → button to inspect all competitors and pure-language variants for that ecosystem.
Checking a nested city string, incrementing a 64-bit sequence counter, and splicing only the dirty field back into the packet.
Note: Cross-language latency reflects each runtime model (AOT native, JIT, interpreter + Rust FFI/NIF, or BEAM). Click any row's All 6 → button to inspect all competitors and pure-language variants for that ecosystem.
Encoding a ~39 KiB message with embedded sub-messages exceeding the 16 KiB 2-byte slot to exercise the 4-byte length path.
Note: Cross-language latency reflects each runtime model (AOT native, JIT, interpreter + Rust FFI/NIF, or BEAM). Click any row's All 6 → button to inspect all competitors and pure-language variants for that ecosystem.
Scaling behavior as embedded sub-message payloads grow, checking for linear O(N) performance across container sizes.
Note: Cross-language latency reflects each runtime model (AOT native, JIT, interpreter + Rust FFI/NIF, or BEAM). Click any row's All 6 → button to inspect all competitors and pure-language variants for that ecosystem.
Go benchmarks.
11-field PeerUpdate struct on Apple M1 Pro (Go 1.27.1). Shorter bars = Faster.
Serializing the 11-field Go struct into a reused byte slice. FlatBuffers and Cap'n Proto times include building the buffer from the struct.
Unpacking and reading all 11 fields into a reused destination struct across every codec, including Protobuf.
Reading a nested string field directly from the raw byte slice. Cap'n Proto and FlatBuffers use offset tables; OmniBuf hops over preceding field headers by length.
Checking a nested city string, incrementing the 64-bit sequence counter, and returning the updated packet. OmniBuf splices the field in place; the others decode and re-encode.
Serializing a 39 KiB packet whose 20 KiB and 18 KiB nested sub-messages exceed the 2-byte 16,383 B length reservation and trigger 2B-to-4B header shifts.
Growing a nested string field past 16 KiB ahead of 32 trailing Neighbor entries via Opaque splicing vs full decode and re-encode.
M1 Pro MacBook Pro, Go 1.27.1 (GOEXPERIMENT=jsonv2), -benchtime=250ms -count=5 -cpu=1. Every decode benchmark reads all 11 fields into a non-inlined checksum sink and reuses the destination struct across codecs, including Protobuf.
Benchmark source lives in benchmarks/omnibuf_bench_test.go, benchmarks/opaque_table_bench_test.go, benchmarks/jsonv2_bench_test.go, and benchmarks/competitors_test.go, with recorded output in testdata/benchmarks.txt and testdata/benchmarks.json.
Wire size.
Packet size is identical across all 11 OmniBuf runtimes. Protobuf saves ~7% on dense messages by omitting type disambiguation, while OmniBuf stays 35% to 54% smaller than Cap'n Proto, FlatBuffers, MessagePack, and JSON.
Even with optional Field #0 metadata enabled (writing field names once at the top of the packet), OmniBuf is still 4% smaller than MessagePack.
Benchmark methodology.
Every runtime runs the same six workloads on the same Apple M1 Pro machine against idiomatic Protobuf, JSON, and native serializers. Each test targets a specific wire-format property so fast paths cannot hide regressions elsewhere.
Test Payloads & Equal-Footing Rules
The primary workload is an 11-field PeerUpdate struct with unsigned and signed integers, booleans, UTF-8 strings, a nested Location sub-message, packed integer arrays, and repeated nested peer entries (366 B in OmniBuf, 341 B in Protobuf, 803 B in JSON). The large-embed and growth workloads use a ~39 KiB message with embedded sub-messages exceeding OmniBuf's 16 KiB 2-byte length slot, forcing the 4-byte container length path.
Every full-decode benchmark reads all 11 fields into a non-inlined checksum sink so lazy wrappers (such as C upb arenas or FlatBuffers tables) perform the same field materialization as eager structs.
Where a benchmark reuses output buffers or destination structs, every competitor in that chart gets the same reuse. AOT languages compile with release optimizations (-O3, --release, -c release), and JIT runtimes (V8, JVM C2, .NET RyuJIT) warm up before timing. Every harness and recorded JSON output lives in its language repository under benchmarks/ and testdata/benchmarks.json.
Why These Six Benchmarks
Full Message Encode Speed
Serializes the 11-field PeerUpdate struct into a byte buffer. Every RPC response, event producer, and cache write hits full-message encoding on the hot path, and this workload directly tests whether single-pass 2-byte length slots and Prefix-Varint writes outperform Protobuf two-pass Size() walks and LEB128 loops.
Full Message Decode Speed
Unpacks all 11 fields of PeerUpdate into a destination struct and feeds every field into a non-inlined checksum sink. Reading every field prevents lazy wrappers from skipping work and isolates trailing-zero Prefix-Varint loads and packed primitive arrays against LEB128 byte loops and JSON tokenizers under equal struct reuse.
Read a Single Nested Field
Extracts one nested string (location.city) straight from raw wire bytes. Proxies, routers, and log filters often inspect a single routing key inside a larger payload, so this test highlights length-prefixed field skipping over Protobuf and JSON full decodes while showing honestly where FlatBuffers and Cap'n Proto offset tables stay faster.
Selective Single-Field Mutation
Checks location.city, increments a 64-bit sequence counter, and returns updated packet bytes. Middleware and stream processors frequently validate one field, stamp a counter or flag, and forward the message, making this the direct test of Opaque in-place field splicing against a full decode, allocate, and re-encode cycle.
Large Embedded Message Encode
Encodes a ~39 KiB message with embedded sub-messages exceeding OmniBuf's 16 KiB 2-byte length slot. Real batch responses and nested blobs routinely cross 16 KiB, so this benchmark exercises the 4-byte container length fallback path to confirm the 2-byte fast path is not masking a performance cliff on large payloads.
Embedded Message Growth
Measures encode latency as embedded sub-message sizes scale up across multiple thresholds. Tracking growth catches quadratic buffer shifting or repeated re-sizing early and verifies linear O(N) scaling across container sizes.