properly implemented hardware accelerated hamming weight