logoalt Hacker News

nraynaudtoday at 3:29 AM1 replyview on HN

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


Replies

ack_completetoday at 6:39 AM

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.