Open
Description
Is your feature request related to a problem? Please describe.
As well as allocating and having an indirection a byte[]
Has 24 bytes of header
- Object header: 16 bytes total
- 8 bytes for the sync block
- 8 bytes for the method table pointer
- Array length field: 4 bytes (stored as an Int32)
- Padding: Up to 4 bytes added so that the total object size is a multiple of 8 bytes
Then 8 bytes for the pointer
So is already 32 bytes without any data; so might as well use a 32byte struct rather than a 64byte array (32bytes+32bytes); since all values are treated as unique and don't really share byte[]
for leaf values
Describe the solution you'd like
Use using Word = Vector256<byte>
Words instead of byte[]
; this should reduce GC objects considered and use less memory (since even 1 byte is 33 bytes)
Describe alternatives you've considered
Leaving it unchanged