We currently use 4 bytes to encode the header length in compatible record serialization.
Using 2 bytes (Word16) over 4 bytes (Word32) causes about 5% regression in the peek benchmark.
Check why the regression happens.
Is Word32 more efficient than Word16?
Possibly as we need to mask more bits in Word16.
With that in mind, is Word64 the most efficient?
No, It is not. (Checked)
We currently use 4 bytes to encode the header length in compatible record serialization. Using 2 bytes (Word16) over 4 bytes (Word32) causes about 5% regression in the
peek
benchmark. Check why the regression happens.Is
Word32
more efficient thanWord16
? Possibly as we need to mask more bits inWord16
.With that in mind, is
Word64
the most efficient? No, It is not. (Checked)See https://github.com/composewell/streamly/pull/2584 Reverting the last commit introduces 5% regression in the compatible record benchmark.