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
[gRPC] Design support for controlling integral type encodings #631
Protobuf supports many integer types, and most types control the encoding of the integer as part of the binary-packed protobuf message.
int32 / int64 : variable-length 32/64 bit signed integers, inefficient for negative numbers
uint32 / uint64 : variable-length 32/64 bit unsigned integers
sint32 / sint64 variable-length 32/64 bit signed integers, more efficient for negative numbers
fixed32/fixed64 fixed-length 4/8 byte unsigned integer, more efficient than uint32/uint64 if values are often greater than 2^{28} / 2^{56}
sfixed32/sfixed64 fixed-length 32/64 bit signed integers, always 4/8 bytes
In the prototype, we are mapping Cadl int32/int64/uint32/uint64 to the same-named types in Protobuf, but we should expose these encoding knobs to developers, since they can have a big impact on the performance characteristics of a service.
gRPC Priority: 1
Points Estimate: 3
Needs Design - possibly just default to variable-length int32/int64 and uint32/uint64 and use decorators to designate sint/fixed/sfixed.
Activity
witemple-msft commentedon Jun 21, 2022
gRPC Priority: 1
Points Estimate: 3
Needs Design - possibly just default to variable-length
int32/int64anduint32/uint64and use decorators to designate sint/fixed/sfixed.