in reply to &1 is no faster than %2 when checking for oddness. Oh well.
Furthermore, you're testing this in Perl, not in C or in assembler. Perl has such a huge overhead that even if bare division took twice as long as bitwise and, by the time you get to the level of interpreted Perl, you lost most of your advantage.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: &1 is no faster than %2 when checking for oddness. Oh well.
by diotalevi (Canon) on Nov 17, 2006 at 20:47 UTC |