I am considering using a central scalar with an integer value that can be accessed as a bitfieldIn that case, you may find vec useful.
In perl 5.8.x on a 32-bit platform, a scalar holding an integer will typically use 16 bytes; a float 20; a string 28 + length of string; an array 52; an array slot 4; a hash 60; a hash slot (24 to 48) + length of key.
Dave.
In reply to Re: Optimizing Memory consumption
by dave_the_m
in thread Optimizing Memory consumption
by PerlingTheUK
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |