Zero-copy deserialization (placeholder)

This is an illustrative placeholder, not a completed benchmark or a claim that one serialization format is universally faster. A zero-copy reader can borrow a view into a validated byte buffer instead of allocating an owned value for every field:

struct MessageView<'a> {
    bytes: &'a [u8],
}

impl<'a> MessageView<'a> {
    fn payload(&self, start: usize, end: usize) -> Option<&'a [u8]> {
        self.bytes.get(start..end)
    }
}

A real comparison would need representative schemas, inputs, compiler settings, and measurements of both decode time and allocation behavior; those results are intentionally not asserted here.

Back to notes