If you just need to count the number of set bits there is no need to drop into Inline C. This example from perlfuncunpack will do that quite efficiently:
my $setBits = unpack("%32b*", $strings[ $i ];
but I don't see how you get from that to the 4 numbers the OP wants?
In reply to Re^2: Speeding permutation counting
by BrowserUk
in thread Speeding permutation counting
by albert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |