Fudged bit manipulation for table lookup
Using pd's bit-hacking method for table lookup. Cuts CPU 50%