4 ms·
I'm sure you know this, but just another point for people to keep in mind: using a length+contents representation makes it harder to modify the payload, if need
by interroboink 2y ago
I'm sure you know this, but just another point for people to keep in mind: using a length+contents representation makes it harder to modify the payload, if needed (more bookkeeping). And using a variable-size length makes that even harder, since you might have to shift or re-copy the full payload to make room for the new "length" header.
Of course, once you're done processing and are sending it along (as in serialization, that you mention), it's not an issue.