3 ms·
I recently did some similar optimization of something that had already been written in hand-tuned asm. I wasn't able to get any real improvement on the CPUs the
by brigade 4y ago
I recently did some similar optimization of something that had already been written in hand-tuned asm. I wasn't able to get any real improvement on the CPUs the asm was originally written for (5+ year old Cortex CPUs), but I did get a 40% improvement on M1 with basically the strategy he used to optimize bitparsing. And that was before writing it in asm; writing the newly optimized algorithm in full asm didn't really help.
M1 is so wide that changing algorithms for lower critical-path latency can be more essential than writing good asm, since you are in no danger of saturating 8 instructions per cycle. And changing algorithms isn't something a compiler can do (or really even should do given that 40% faster on M1 translated to 5-10% slower on the old CPUs...)