3 ms·
If you look at operations per cycle, in this example for Intel Haswell processors, you'll find that an equivalent add and multiple are quite a bit different. A
by reportingsjr 5y ago
If you look at operations per cycle, in this example for Intel Haswell processors, you'll find that an equivalent add and multiple are quite a bit different.
An add/subtract from a 32 bit register to register is 0.25 cycles per operation.
A multiply from 32 bit register to register is 2 cycles per operation. So a 8x speed difference, not counting for latency, etc.
See page 230 and 231 of this paper: https://www.agner.org/optimize/instruction_tables.pdf https://www.agner.org/optimize/instruction_tables.pdf
- gnufx 5y agoFor what it's worth, what counts for normal implementations is the number of multiply-add operations per cycle, typically two on current hardware with FMA.