You can save another ~25% or so on large bitstrings by avoiding duplicating the bitvector. Just use the aliasing nature of the elements of @_:
sub unpack_count_ref { my $count = unpack("%32b*", $_[ 0 ] ); return $count; }
In reply to Re: An array of boolean values in a bitfield
by BrowserUk
in thread An array of boolean values in a bitfield
by kyle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |