On Thu, 21 Dec 2000, Matthias Andree wrote:
>
> x * 10 can be written as:
>
> (x << 2 + x) << 1   = (4x+x) * 2
> (x << 3) + (x << 1) = 8x + 2x

Or as "x * 10".  Which has the advantage of actually being readable, and
letting the compiler optimize it into one of the other forms if that's
profitable on the machine you are compiling for.

Why do you guys bother making strtoul run fast anyway?  Surely it's not on
any critical path in the kernel?


Bernd

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to