veorq/SipHash

Simplify switch?

veorq opened this issue · 3 comments

veorq commented

from https://twitter.com/vmload/status/1552613272532172801

Switch case could be simplified to this?

for (i = 1; i <= left; i++) {
b |= ((uint64_t)ni[i - 1]) << (8 * (i - 1));
}

I agree that it doesn't simplify anything. The code is shorter, but less readable.

veorq commented

let's stick to switch, thanks @jedisct1 @demerphq for your input.