in reply to Efficient bit-twiddling in Perl.
If you have to do that millions of times, you can try building a table for the combined three 6bit quantities:
my @table; $table[$_] = [..., ..., ...] for 0..0x0003ffff; ... for my $n (...) { my $top = $n >> 18; my ($nxt, $mid, $bot) = @{$table[$n & 0x0003ffff]}; ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Efficient bit-twiddling in Perl.
by BrowserUk (Patriarch) on Feb 28, 2013 at 19:13 UTC |