[EMAIL PROTECTED] wrote:
There are a couple of things in the implementation of this class that
I just don't understand:
- A minor nit: This class appears to do a lot of division and
remainder calculations with powers of 2 (frequently 8). Is it not
generally preferably to do this with shifts and bitwise ANDs?
I prefer the approach that leads to code that is easy to understand.
If the purpose of the code is to divide by two I prefer clear code like:
a = b / 2;
to
a = b >> 1;
Good compilers typically compile multiplication down to shift
instructions, why have the human do it?
Dan.