3 ms·
Implementing multiplies as a bunch of adds has got to suck for performance though.
by sgerenser 2y ago
Implementing multiplies as a bunch of adds has got to suck for performance though.
- colejohnson66 2y agoWell, if you decompose it to a series of shifts and adds, it’s a bit quicker. That’s actually how the 8086 implemented it.
- rowanG077 2y agoSure. Multiplication is exceedingly rare compared to any of those 8 instructions though. RISC-V base instruction set doesn't include multiplication for example. If you had room to add more then 8 I would rather add the bitops first. This will allow you to also write a much more efficient soft mul in addition to many more things.