#2386 trying a new static lookup table for numberOfOnes()

This commit is contained in:
Tony Hagale 2014-03-19 16:28:12 -05:00
parent 5f94e44cde
commit 7f2a92d759

View file

@ -131,7 +131,7 @@ void outputBits(unsigned char byte, QDebug* continuedDebug) {
int numberOfOnes(unsigned char byte) {
static const unsigned char nbits[256] = {
static const int nbits[256] = {
0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,
4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,
4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,