Not to mention it's completely unneccessary, on any platform where it's
actually useful, the compiler can replace the division with shift. I'm
told that on architectures like Alpha the clean division is faster,
anyway.
In my FAT-optimization patch (At least last time I posted that patch it
caused some confusion;) I moved to shift instead of division for the
specific reasons that FAT is an uncommon thing to encounter on Alpha last
I heard, and since the divisor in question was loaded from disk, there was
no way the optimizer could know it was goign to be a power of two, whereas
we indepently know it from MS-DOS reference books.
There's no reason to "optimize" _constant_ divisions/multiplications by
hand except perhaps for aesthetic reasons, and last time this came up, the
consensus was people felt more comfortable seeing the divisions and
multiplications than shifts, for the specific reason this slip-up
demonstrates.
Ofcourse, if it was not a slip-up but the intention actually was to change
the division into multiplication, then you can ignore most of the above,
except that if multiplication had been used instead, we'd have avoided
this confusion ;)
-Donwulff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/