I do not know what overhead arises when searching in an int array. What will be better (in C #):
a = aLookup[i];
b = (a % 6) == 5;
c = (b ? a+1 : a-1) >> 1; // (a + 1) / 2 or (a - 1) / 2
or
a = aLookup[i];
b = bLookup[i];
c = cLookup[i];
Will array search really save so much time for bor c?
Edit: I have profiled it in several ways. As a result, finding arrays is almost four times faster.
source
share