开发者

which kind of calculation: '+', '-', '*', '/' is fastest on an intel X86 cpu? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the wo开发者_JS百科rldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

Which kind of calculation: +, -, *, / is fastest on an intel X86 cpu? Somebody told me / is the fastest, but he didn't tell me why. I have no idea. Can it be proven?


For integer operations on most chips, generally addition/subtraction are fastest, followed by multiplication, with division coming in last. I don't have a link handy but it's pretty common knowledge.


You can refer to the table of this link http://www.tantalon.com/pete/cppopt/appendix.htm#AppendixB_RelativeCosts

I think it is similar to x86 cpu (32-bit). As the table, '/' is the slowest.


All mentioned will be fastest i guess supposed to be. Because these are the common operations in any cpu, so obviously Intel would have tried their best way to keep up the performance with all these operation. So according to my point all these operation will be fast as it should be(that is how they are prepared by the intel)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜