4 ms·
Dividing one 32-bit number by another is a constant-time operation even if on some machines (e.g. ARM) it is implemented as a loop. This is what matters. Rais
by mansr 16y ago
Dividing one 32-bit number by another is a constant-time operation even if on some machines (e.g. ARM) it is implemented as a loop. This is what matters. Raising a number to the nth power is an O(log n) operation.
- jedbrown 16y agoDivision takes a data-dependent number of cycles on all x86-64 processors.