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
Currently a message references' smallest representation is an
improper list with two integer terms; the Raft index and the
message size in bytes. This has a heap overhead of 2 words +
2 words for the cons cell in the queue data structure.
This commit introduces a new more compact form that is
used if the Raft index is less than 44 bits and the
message size is less than 32KiB. In this case the
Raft index and message size is packed into a 59 bit
integer which is the largest unsigned integer that
is still an immediate term and thus has 0 heap overhead
as the integer value fits into the pointer word completely.
This reduces per message overhead to the 2 words for
the cons cell and thus halves message memory use
for a lot of scenarios.
If a message cannot be packed it will fall back
to the current list based representation.
0 commit comments