3 ms·
> I have written code where I took advantage of x86's ability to compute a+b*9 with a single instruction... Didn't check, but I suspect that decodes at least i
by vardump 6y ago
> I have written code where I took advantage of x86's ability to compute a+b*9 with a single instruction...
Didn't check, but I suspect that decodes at least into two microinstructions.
- pizlonator 6y agoI’m assuming a is a constant in your example and that you’re doing a(b, b, 8). That’s one cycle on modern intels I believe (I think the manual promised this for Nehalam). OP also alludes right this fact when talking about fusion.
- pbsd 6y agoNot only is it a single uop for the last 10 years of Intel chips, you can also run 2 of them per cycle.
- bumblebritches5 6y agoNope. It's a pretty famous instruction, FMA Fused Multiply-Add