4 ms·
True, multiplication latency is a big high, 4 clocks basically in most recent Intel processors: https://software.intel.com/sites/default/files/managed/9e/bc/64
by antirez 10y ago
True, multiplication latency is a big high, 4 clocks basically in most recent Intel processors:
https://software.intel.com/sites/default/files/managed/9e/bc/64-ia-32-architectures-optimization-manual.pdf https://software.intel.com/sites/default/files/managed/9e/bc...
However 64 bit divisions is terrible at ~100 cycles per 64 bit division. It is true that the 32 bit division is much faster, but now that the target is 64 bit, the 64 bit divisions are very popular. It's something to take in mind when doing fast math... when 32 bits are enough and there are unavoidable divisions, use 32 bits integers.