Performance of 32-bit integers in a 64-bit environment (C++)

后端 未结 6 1306
一个人的身影
一个人的身影 2021-02-20 01:00

We\'ve started compiling both 32- and 64-bit versions of some of our applications. One of the guys on my project is encouraging us to switch all of our 32-bit integers to their

6条回答
  •  情歌与酒
    2021-02-20 01:33

    Well if the 32-bit operations are taking place in 64-bit registers, some extra instructions do need to get emitted to handle things like setting carry/overflow flags, etc. I'd be surprised if you realised any noticeable performance improvement, though. I can all but guarantee there are far worse bottlenecks in your program.

提交回复
热议问题