为什么加法运算比乘法运算快?
有人可以解释一下为什么加法运算比乘法运算更快吗?
例如,如果我们需要将 25 乘以 50,
编译器会将其转换为加法的 for 循环吗?
Could someone please explain why is addition operation faster than multiplication operation ?
for example if we need to multiply 25 by 50
will the compiler transform it to a for loop of additions ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
乘法是一个更加复杂的过程,需要更多的芯片作为乘法器电路或在查找表中,以达到与提供通过添加。
Multiplication is a much more complex process, requiring more silicon either as a multiplier circuit or in a lookup table in order to reach the same level of performance as provided by addition.
编译器会将其转换为添加的 for 循环吗?
will the compiler transform it to a for loop of additions ?