Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. 32-Bit application runs faster than 64-Bit, any ideas?

32-Bit application runs faster than 64-Bit, any ideas?

Scheduled Pinned Locked Moved .NET (Core and Framework)
questioncsharp
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ami Bar
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • A Ami Bar

      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

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      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


      A 1 Reply Last reply
      0
      • L Luc Pattyn

        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


        A Offline
        A Offline
        Ami Bar
        wrote on last edited by
        #3

        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

        L 1 Reply Last reply
        0
        • A Ami Bar

          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

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          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


          A 1 Reply Last reply
          0
          • L Luc Pattyn

            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


            A Offline
            A Offline
            Ami Bar
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups