modular-bitfield icon indicating copy to clipboard operation
modular-bitfield copied to clipboard

Question: Array of bitfields

Open MikeColeGuru opened this issue 2 years ago • 1 comments

I'm considering using this library ..

I'm needing to create large arrays of these.

What is the overhead as far as memory? I am storing nibble sized structs with two enums.

MikeColeGuru avatar Oct 13 '22 06:10 MikeColeGuru

Generally the modular bitfield structs should not impose overhead besides longer compilation times due to usage of proc. macros. This library was designed to not introduce overhead anywhere. Bitfield structs are aligned to byte sized portions since underlying we are using a [u8; N] array. If you are using an array of bitfield structs you are just using an array of an array underlying.

Robbepop avatar Oct 13 '22 06:10 Robbepop