Note that that sequence of unpack/pack/unpack achieves exactly the same thing as AnomalousMonk's unpack "%32b$p".
But the latter avoids turning a 500MB string into a 4 billion element list of 1s and 0s before converting it back to the 500MB string; which is what that sequence of unpack/pack/unpack does.
In reply to Re^2: Efficient bit counting with a twist.
by BrowserUk
in thread Efficient bit counting with a twist.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |