|
|
|
|
|
by Sanddancer
4007 days ago
|
|
It's interesting, but a loop makes for smaller code, by a couple dozen bytes or so: int remaining = len % 4;
if (remaining)
{
do
{
remaining--;
h ^= (data[(length & ~3) + remaining] & 0xff) << (remaining * 8);
}
while(remaining);
h *= m;
}
Fall-through's interesting, but at the same time, as architectures have changed, has become less useful. Self-modifying code at one time was near vital, but has fallen by the wayside, fall-through is doing much the same. |
|