6 ms·
He could have added the switch statement optimization. That's my favorite. GCC 4 can optimize switch statements with sequential keys e.g. (1,2,3,4 ...) into a j
by Aegean 16y ago
He could have added the switch statement optimization. That's my favorite. GCC 4 can optimize switch statements with sequential keys e.g. (1,2,3,4 ...) into a jump table. This was AFAIK introduced in GCC 4
- ramchip 16y agoBut he did: The switch statement was optimized to a jump table, while the if statements became a long sequence of compares.