in reply to Re: Power of two round up.
in thread Power of two round up.
Although it's a technique more appropriate in a C program.
In Perl, log($_)/log(2) benchmarks faster.
(assuming it rounds properly at the boundaries)
Update: My earlier timethese qq{} may have been misleading. With timethese sub{} the | >> method comes out faster
Update: My earlier timethese qq{} may have been misleading. With timethese sub{} the | >> method comes out faster
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Power of two round up.
by Dominus (Parson) on Dec 17, 2000 at 05:35 UTC | |
by I0 (Priest) on Dec 18, 2000 at 22:44 UTC |
In Section
Cool Uses for Perl