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
{{ message }}
Repository navigation
Commit 3e76017
Browse filesBrowse the repository at this point in the historyBrowse files
codec: simplify and inline varint decoding (SFT-8112)
Only the last byte can overflow, so it's the only one checked.
Redundant encodings such as [0x80, 0x00] decode fine. Rejecting them is
not really necessary, as nothing else makes encodings unique either:
non-frozen structs skip unknown trailing fields. And the check costs
measurably, 6-19 ns per multi-byte varint on the device.
On the device, this cuts the time to decode small messages into their
borrowed form by a third to a half.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments