Re:What do RISC and CISC mean in 2020?
by Asooka on Friday November 20, 2020 @05:08PM
(#25165649)
That was for back when CPUs didn't really have native division or multiplication. So a mul or div would literally be like calling a function to do it using other arithmetic instructions, except the function is stored in the CPU. Which goes against the RISC philosophy and makes the CPU more complex for not much gain.
[ Parent
| on HN ]
Re:What do RISC and CISC mean in 2020?
by qwerty456127 on Friday November 20, 2020 @06:30PM
(#25166412)
> So a mul or div would literally be like calling a function to do it using other arithmetic instructions, except the function is stored in the CPU.
Wouldn't this be times (if not orders of magnitude) faster than loading it in software anyway? I believe it was one of the most frequently used functions, hard or soft.
Re:What do RISC and CISC mean in 2020?
by marcan_42 on Friday November 20, 2020 @11:19PM
(#25167849)
Multiplication is reasonably common. Once you have multiplication by a constant you get division by a constant for free, so that leaves division by a variable. That is a very rare operation in non-mathy code, and usually for math you'd end up with floating point division anyway which is a whole different ball game (good code anyway; people writing for modern CPUs will of course throw integer division and modulo around without second thought, but the vast majority of the time you can avoid those operations and run faster).