3 ms·
Normally, rather than counting on two different codepaths to take the same number of cycles, assembly code written for constant execution time will always run a
by JoshTriplett 6y ago
Normally, rather than counting on two different codepaths to take the same number of cycles, assembly code written for constant execution time will always run all the same instructions unconditionally.
So, you don't have to know how many cycles every instruction takes; you just have to make sure you use instructions that don't take a data-dependent number of cycles.