[1] If you ever have to design one, make sure that reading the first byte is enough to determine the number of subsequent length bytes.
[1] If you ever have to design one, make sure that reading the first byte is enough to determine the number of subsequent length bytes.
Would it ever be an actual bottleneck though? If it's not actually impeding throughput, I feel like this is more of an aesthetic argument than a technical one, and one where I'd happily sacrifice aesthetics to make the code simpler.
> some message can exceed 2^32 bytes
Fair enough, but that just makes the question "would 8 bytes per message ever actually be a bottleneck", which I'm still not convinced would ever be the case
Anything more requires multiple IPCs, with lots of expensive context switches.
Wasting even one precious byte on a pointless header would absolutely be an issue in this environment.