public UInt16 len
{
readonly get => (UInt16)BitPrimitives.ReadUInt16LSB(other, 5, 11);
set => BitPrimitives.WriteUInt16LSB(ref other, 5, (UInt16)value, 11);
}
if like this will better:
public ushort len {
[inline(256)] readonly get => (ushort)((other >> 3) & 0x07FF);
[inline(256)] set => other = (ushort)((other & ~(0x07FF << 3)) | ((value & 0x07FF) << 3));
}
If done to its fullest potential, it might be possible to generate two structures: one for building and one for reading only, thus fully benefiting from compiler optimizations.
if like this will better:
If done to its fullest potential, it might be possible to generate two structures: one for building and one for reading only, thus fully benefiting from compiler optimizations.