, , . , , - , .
- C, , ( (-S gcc, -O0, ), ). .
As a joke, I tested PowerPC for some time (and not MIPS, I know ...) to quickly count bits in a 32-bit int. The method that I linked was the best of all the other methods until I ran the lookup table byte size and accessed it 4 times. It would seem that ALU is slower than cache binding (runs about a million numbers through the algorithm).
source
share