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
Use more efficient serialization format for long integers in cache files (#20151)
A long integer (one that doesn't fit in the 4-byte encoding) will now be
encoded like this:
* initial header byte
* short integer (1-4 bytes) encoding the number of bytes of data and
sign
* variable-length number of data bytes (absolute value of the integer)
-- all bits are used
For example, a 32-bit integer can now always be encoded using at most 6
bytes (+ type tag).
This is optimized for size efficiency, not performance, since large
integers are not expected to be a performance bottleneck. Having an
efficient format makes it easier to improve performance in the future,
however, without changing the encoding.
The header byte has a few unused bits which could be used to slightly
improve efficiency, but I decided that it's not worth the extra
complexity.
0 commit comments