Bit::Fast - A set of fast bit manupulation routines
use Bit::Fast qw(popcount popcountl); my $count = popcount(33); print $count, "\n"; # prints 2 # 8-byte integer value: $count = popcountl(33 << 33); print $count, "\n"; # prints 2
The goal of this module is provide fast bit manipulation routines.
Returns the number of 1-bits in $v. Works on 32-bit integers.
Returns the number of 1-bits in $v. Works on 64-bit integers. (This function is not provided on 32-bits builds of perl.)
Dmitri Tikhonov, <dmitri@cpan.org>
Copyright (C) 2015 by Dmitri Tikhonov
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Bit::Fast, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bit::Fast
CPAN shell
perl -MCPAN -e shell install Bit::Fast
For more information on module installation, please visit the detailed CPAN module installation guide.