Porting 32 bit C++ code to 64 bit - is it worth it? Why?

前端 未结 19 2839
攒了一身酷
攒了一身酷 2020-12-24 00:58

I am aware of some the obvious gains of the x64 architecture (higher addressable RAM addresses, etc)... but:

  • What if my program has no real need to run in nati
19条回答
  •  庸人自扰
    2020-12-24 01:54

    As to performance issues, it depends on your program actually. If your program is pointer-intensive, porting to 64-bit may cause performance downgrading, since for CPU cache with the same size, each 64-bit pointer occupy more space on cache, and virtual-to-physical mappings also occupies more TLB space. Otherwise, if your program is not pointer-intensive, its performance will benefit from x64.

    Of course performance is not the only reason for porting, other issues like porting effort, time scheduling should also be considered.

提交回复
热议问题