32-Bit application runs faster than 64-Bit, any ideas?
-
Hi, I have a .net application that does a lot of number crunching and I run it on a 64-Bit machine with quad CPU. The machine has 4GB RAM.:) When I compile the application to explicitly target x86 machine the application runs faster than when I compile it to target x64 machine. The difference is around 50% !!!:confused: I don't change anything in the application except the target machine. The application is a pure .net application. Any idea, what is the reason for this? Ami
-
Hi, I have a .net application that does a lot of number crunching and I run it on a 64-Bit machine with quad CPU. The machine has 4GB RAM.:) When I compile the application to explicitly target x86 machine the application runs faster than when I compile it to target x64 machine. The difference is around 50% !!!:confused: I don't change anything in the application except the target machine. The application is a pure .net application. Any idea, what is the reason for this? Ami
Hi, can you tell more about your app, what it is doing, what the most common data types are? why would you expect it to run faster? is your data basically 64-bit wide? 32-bit? 16-bit? is it text processing? what language are you using? :)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
-
Hi, can you tell more about your app, what it is doing, what the most common data types are? why would you expect it to run faster? is your data basically 64-bit wide? 32-bit? 16-bit? is it text processing? what language are you using? :)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
-
Hi, The common type is double, which is 8 bytes long. The application does a lot for number operations (simple adding, multiplying, etc.) I expect the x64 version to run at least as fast as the x86 version. I am using C#. Ami
Hi Ami, assuming the calculations outweigh the memory transfers and general program flow, I expect no difference whatsoever between a 32-bit and a 64-bit version of your app: they both will spend their time mostly on processing 64-bit data that sits in the float registers and/or the data cache. So if your 64-bit app is slower, something definitely is wrong. Are you comparing equal things (e.g. both release builds, identical jobs)? If you have been trying to optimize things by using multiple threads, then maybe the two systems you compare are not equally happy about your threading approach. If this applies, it has to be looked at more thoroughly... As a first measure, you could reduce to one thread and compare these (again expecting equality). :)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
-
Hi Ami, assuming the calculations outweigh the memory transfers and general program flow, I expect no difference whatsoever between a 32-bit and a 64-bit version of your app: they both will spend their time mostly on processing 64-bit data that sits in the float registers and/or the data cache. So if your 64-bit app is slower, something definitely is wrong. Are you comparing equal things (e.g. both release builds, identical jobs)? If you have been trying to optimize things by using multiple threads, then maybe the two systems you compare are not equally happy about your threading approach. If this applies, it has to be looked at more thoroughly... As a first measure, you could reduce to one thread and compare these (again expecting equality). :)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
Hi Luc,
Luc Pattyn wrote:
So if your 64-bit app is slower, something definitely is wrong. Are you comparing equal things (e.g. both release builds, identical jobs)?
It is the exact project (Release mode), the only difference is the target CPU x86 or x64.
Luc Pattyn wrote:
If you have been trying to optimize things by using multiple threads, then maybe the two systems you compare are not equally happy about your threading approach. If this applies, it has to be looked at more thoroughly... As a first measure, you could reduce to one thread and compare these (again expecting equality).
I am using some multithreading, I'll try to do it in one thread and check the results. Thanks for the advice. Ami