简体   繁体   English

64 位 Delphi exe 与 32 位 Delphi exe 的执行速度

[英]Execution Speed of 64-bit Delphi exe versus 32-bit Delphi exe

I have been using the latest version 10.3 of Delphi to create both 32-bit executables and 64-bit executables for my users for the past few years.在过去的几年里,我一直在使用 Delphi 的最新版本 10.3 为我的用户创建 32 位可执行文件和 64 位可执行文件。 I have noticed that the 64-bit version consistently runs 10% to 25% slower than the 32-bit version.我注意到 64 位版本的运行速度始终比 32 位版本慢 10% 到 25%。

My program is a self-contained VCL-based executable that does not use any external DLLs.我的程序是一个独立的基于 VCL 的可执行文件,不使用任何外部 DLL。 My Release configuration compiler options are the same for 32-bit and 64-bit.我的发布配置编译器选项对于 32 位和 64 位是相同的。 Both have Optimization = true.两者都有优化=真。

I had thought that was just the way it is.我原以为事情就是这样。 But today, I was comparing a 32-bit version of a C++ program to the same program in 64-bit, and I found that the 64-bit program was 5% to 10% faster than the 32-bit version.但是今天,我将 C++ 程序的 32 位版本与 64 位的相同程序进行比较,我发现 64 位程序比 32 位版本快 5% 到 10%。

In addition to that, I found this article: Integer Performance Comparison for C++, C#, Delphi which included a table and chart definitely showing Delphi Win64 faster than Delphi Win32: In addition to that, I found this article: Integer Performance Comparison for C++, C#, Delphi which included a table and chart definitely showing Delphi Win64 faster than Delphi Win32: 在此处输入图像描述

So my questions are:所以我的问题是:

  1. Are there any Delphi compiler settings that should be changed for 64-bit builds?是否有任何 Delphi 编译器设置应该针对 64 位构建进行更改?

  2. Which of the following types of processing are slower in 64-bit Delphi than 32-bit?以下哪种类型的处理在 64 位 Delphi 中比 32 位慢?

    • memory-intensive processing?内存密集型处理?
    • extensive numeric calculations?广泛的数值计算?
    • lots of string manipulation?大量的字符串操作?
    • large amount of disk reading/writing?大量磁盘读/写?
    • heavy database access?大量的数据库访问?

Was this under the IDE?这是在 IDE 下吗? I notice a significant slow down running 64-bit vs 32-bit under the IDE running a simple process that takes about 5-10 seconds.我注意到在 IDE 下运行 64 位和 32 位的速度明显变慢,运行一个简单的过程大约需要 5-10 秒。 However, this is not true for me when run outside of the IDE.但是,当我在 IDE 之外运行时,情况并非如此。 So I tend to debug in 32bit.所以我倾向于在32位调试。

Running that same simple process in 64bit outside of the IDE seems maybe slightly faster than the 32bit version.在 IDE 之外的 64 位中运行相同的简单过程似乎可能比 32 位版本稍快。

Edited as a follow-up to clarify what my process was:进行了后续编辑,以澄清我的流程是什么:

My process is loading an XML file into a clientdataset followed by reads/writes to a Firebird local 64-bit server via either my 32 or 64 version compiled in Debug.我的过程是将 XML 文件加载到客户端数据集中,然后通过我在调试中编译的 32 或 64 版本读取/写入 Firebird 本地 64 位服务器。 Also using CData's AWS DynamoDB access is significantly slower compiled in 64bit vs 32 bit under the IDE, however that AWS access in the 64bit app is faster than the 32bit outside of the IDE.同样使用 CData 的 AWS DynamoDB 访问在 IDE 下以 64 位编译相比 32 位编译速度要慢得多,但是 64 位应用程序中的 AWS 访问比 IDE 之外的 32 位更快。 Go figure. Go 图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM