是否有任何真正的问题编译一个Windows应用程序的64位?应用程序、有任何、问题、Windows

2023-09-08 00:50:35 作者:我是土豆又土又逗

我会理直气壮的说99%的我们写不需要超过2GB的内存,以满足更多的应用。当然,还有很多明显的好处到的操作系统的运行64位,以解决更多的RAM,但有一个典型的应用将被编译64位什么特别的原因?

I'd confidently say 99% of applications we write don't need to address more than 2Gb of memory. Of course, there's a lot of obvious benefit to the OS running 64-bit to address more RAM, but is there any particular reason a typical application would be compiled 64bit?

推荐答案

有性能方面的改进可能与64位看到。一个很好的例子是,在函数调用一些参数通过寄存器传递(少推堆栈上的东西)。

There are performance improvements that might see with 64-bit. A good example is that some parameters in function calls are passed via registers (less things to push on the stack).

修改 我查阅了一些我的旧笔记时,我正在研究一些与64位运行我们的产品的差异建立与32位版本。我跑了四核64位计算机上的测试。因此,有因为32位被仿真模式下运行明显比较苹果和橘子的问题。然而,似乎很多东西我读像这样,例如,一直说,速度命中WOW64是不显著。但是,即使这种说法是不正确的,你的应用程序将几乎肯定会在64位操作系统上运行。因此,一个32位的比较,建立与64位机上的64位具有价值。

Edit I looked up some of my old notes from when I was studying some of the differences of running our product with a 64-bit build versus a 32-bit build. I ran the tests on a quad core 64-bit machine. So there is the question of comparing apples to oranges since the 32-bit was running under the emulation mode obviously. However, it seems that many things I read such as this, for example, consistently say that the speed hit for WOW64 is not significant. But even if that statement is not true, your application will almost certainly be run on a 64-bit OS. Thus a comparison of a 32-bit build versus 64-bit on a 64-bit machine has value.

在我进行的测试(当然不是COM prehensive),我没有发现任何情况下,32位版本更快。与64位版本的运行时,然而,许多在SQL集约化经营,我跑(高CPU和高I / O)分别为20%〜50%的速度。这些测试涉及到一些相当丑陋的SQL语句,还有一些TPCC测试,高并发。当然,很多依赖于编译器开关相当多,所以你需要做你自己的测试。

In the testing I performed (certainly not comprehensive), I did not find any cases where the 32-bit build was faster. However many of the SQL intensive operations I ran (high CPU and high I/O) were 20% to 50% faster when running with the 64-bit build. These tests involved some fairly "ugly" SQL statements and also some TPCC tests with high concurrency. Of course, a lot depends on compiler switches quite a bit, so you need to do your own testing.