in reply to Re: Speeding permutation counting
in thread Speeding permutation counting
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Speeding permutation counting
by Limbic~Region (Chancellor) on Jul 19, 2007 at 20:46 UTC | |
by BrowserUk (Patriarch) on Jul 19, 2007 at 21:15 UTC | |
by Limbic~Region (Chancellor) on Jul 20, 2007 at 00:08 UTC | |
by BrowserUk (Patriarch) on Jul 20, 2007 at 00:19 UTC | |
by Limbic~Region (Chancellor) on Jul 20, 2007 at 00:58 UTC |