none
64bit compiled code running slower than 32bit. Where do I start looking? RRS feed

  • Question

  • Hi All, 

    We have recently started compiling in 64 and 32 bit editions of our code, and somehow the 64bit is running at around 200% of the time the 32 bit code takes. So where do I start looking? 

    Ideas so far include older 32bit DLL's might be slowing us, some threads finishing faster on 64bit and causing some kind of lockup. 

    What else? Any tools available for this, or are we looking at Process Monitor and trying to work it out by hand?

    Thanks in advance!

    • Moved by Bob Shen Friday, December 21, 2012 7:15 AM (From:Visual C# )
    Friday, December 21, 2012 1:51 AM

Answers

  • Hi Coggs Machine,

    When running on 64b CPU, you get the same memory interface no matter if you are running 32b or 64b code (you are using the same cache and same BUS).

    While x64 architecture has a few more registers which allows easier optimizations, this is often counteracted by the fact pointers are now larger and using any structures with pointers results in a higher memory traffic. I would estimate the increase in the overall memory usage for a 64b application compared to a 32b one to be around 15-30 % and same is true for speed.


    Regards, http://www.shwetalodha.blogspot.in/

    Saturday, December 22, 2012 3:17 AM

All replies

  • Hi The Coggs Machine,

    According to your description, I'd like to move this thread to CLR Forum for better support, where more experts live.
     
    Thanks for your understanding.


    Bob Shen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 21, 2012 7:13 AM
  • Hi Coggs Machine,

    When running on 64b CPU, you get the same memory interface no matter if you are running 32b or 64b code (you are using the same cache and same BUS).

    While x64 architecture has a few more registers which allows easier optimizations, this is often counteracted by the fact pointers are now larger and using any structures with pointers results in a higher memory traffic. I would estimate the increase in the overall memory usage for a 64b application compared to a 32b one to be around 15-30 % and same is true for speed.


    Regards, http://www.shwetalodha.blogspot.in/

    Saturday, December 22, 2012 3:17 AM