3 ms·
I'm unsure if this yields any computational benefits over classic multiplication. "In real arithmetic, multiplication may be faster for the following reason: W
by KETpXDDzR 3y ago
I'm unsure if this yields any computational benefits over classic multiplication.
"In real arithmetic, multiplication may be faster for the following reason:
When two real numbers are multiplied, the mantissae are multiplied together and the exponents are added, and these operations can be carried out in parallel.
When two real numbers are added, first the mantissa of the smaller number must be shifted so that the exponents match (a process termed normalisation). Then the mantissae must be added. The result of the addition may overflow the original word length by 1 bit, or it may generate any number of leading zeros. Therefore the result must be normalised again. There are therefore 3 steps and they must be done in series." - https://www.researchgate.net/post/Is-multiplication-slower-than-addition-on-modern-CPUs https://www.researchgate.net/post/Is-multiplication-slower-t...
- daniel-cussen 3y agoOne addition and one move replacing one multiplication? Absolutely makes things much cheaper.
- kragen 3y agowell, probably. it likely depends on how the move works; muxes aren't free and driving long wires isn't either but the confusion in the comment you are replying to is that it thinks you are deriving a floating-point matrix multiply algorithm, when in fact you are deriving an integer matrix multiply algorithm floating-point adds are slightly more expensive than floating-point multiplies integer multiplies are enormously more expensive than integer adds (in power and area, though not in time)
- KETpXDDzR 3y agoTo support this: "ADDSS/SUBSS take 1–3 cycles while MULSS takes 0.5–5 cycles." - http://www.agner.org/optimize/ http://www.agner.org/optimize/