← Back to context

Comment by nraynaud

11 hours ago

Just a few years ago, mults were slower, but I think now (Intel i9) mult, add and fma are the same.

https://stackoverflow.com/a/39135689

The answer's all over the place with each successive CPU generation. Originally Intel CPUs had adds faster than multiplies, then both went through the FMA unit so they were the same, then they added a fast FP adder, etc. And current timings on uops.info now show FP fma 4c and mul 3c over two multiply units, and add 2c over two separate addition units.