Is integer multiplication really done at the same speed as addition on a modern CPU?

后端 未结 11 744
梦谈多话
梦谈多话 2020-12-23 13:31

I hear this statement quite often, that multiplication on modern hardware is so optimized that it actually is at the same speed as addition. Is that true?

I never ca

11条回答
  •  天涯浪人
    2020-12-23 14:01

    No it's not, and in fact it's noticeably slower (which translated into a 15% performance hit for the particular real-world program I was running).

    I realized this myself when asking this question from just a few days ago here.

提交回复
热议问题