in reply to An array of boolean values in a bitfield
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; }
|
|---|