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

后端 未结 6 1235
一个人的身影
一个人的身影 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:21

    I'd guess (and it's just a guess) that you'll likely see no improvement in performance and may see a slight drop if the amount of memory increase causes some memory access to lose locality of reference and push things out of the cache more often than before.

    As JaredPar says, if there's not a factual reason to do this or unless you need the increased range of the larger ints, it's probably a waste of time.

提交回复
热议问题