static
int hash_3(int hi, int c)
{
return (hi + (c << 4) + (c >> 4)) * 11;
}
gcc-3.2.1 -O2 -march=pentium
...
It is not guaranteed to be this way on all architectures, of course.
But still - no multiplications.
Indeed, I'd missed this. GCC will emit the constant multiply
expansion unless the multiply cost is set VERY low.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/