Updated: Mar 10, 2021
Jim McKeeth's new blog post covered a YouTube video he made comparing building the well-known HeidiSQL open source project in RAD Studio 10.4.1 and then he rebuilt that same project in 10.4.2 resulting in a very respectable 40% faster build times when using the Win32 compiler and 8% faster build when targeting Win64. One item impressive to me was that Jim ran the 10.4.1 test on a physical machine and the 10.4.2 test was executed on a virtual machine hosted by that machine, possibly understating the potential increases.
I quickly covered these improvements in a recent blog post. After seeing the impressive results from Jim, I completed my own set of tests on two identically configured virtual machines on the same physical host. I selected the Spring4D Framework as my test project to build (using the master branch, dated 6/19/2020.)
I used the Build.exe utility which ships with Spring4D to perform the builds after modifying it slightly so it displays the elapsed time of the build process once completed. Here are the results of building Win32 and Win64 debug configurations.
Delphi 10.4.1 results
Time to build: 64245 ms
Time to build: 63366 ms
Time to build: 63466 ms
Average build time: 63692.3 ms
Delphi 10.4.2 results
Time to build: 52460 ms
Time to build: 52713 ms
Time to build: 51995 ms
Average build time: 52389.3 ms
This is a pretty impressive 17.7% faster build time simply by upgrading the project to 10.4.2. I then noticed that the build process was also running tests, so I did another batch of builds and this time I deselected the tests and also executed separate Win32 and Win64 builds which yielded the following results:
Delphi 10.4.1, Win32 build results
Time to build: 15863 ms
Time to build: 14797 ms
Time to build: 14838 ms
Time to build: 15432 ms
Average build time: 15232.5 ms
Delphi 10.4.2, Win32 build results
Time to build: 14137 ms
Time to build: 14253 ms
Time to build: 14518 ms
Time to build: 14903 ms
Average build time: 14452.75 ms
Delphi 10.4.1, Win64 build results
Time to build: 47113 ms
Time to build: 47625 ms
Time to build: 48513 ms
Time to build: 47418 ms
Average build time: 47667.25 ms
Delphi 10.4.2, Win64 build results
Time to build: 36868 ms
Time to build: 37046 ms
Time to build: 36776 ms
Time to build: 37953 ms
Average build time: 37160.75 ms
Somewhat surprisingly, the greatest increase in speed was found with the Win64 builds at 22% faster build times while the Win32 builds were 5% faster. This is different than the HeidiSQL project test which resulted in a huge increase in Win32 builds and a much smaller increase in Win64 builds. Even though these two are very different projects, all builds with Delphi 10.4.2 were faster than the same builds with Delphi 10.4.1.
Delphi has long been known for being fast; however, it is once again fast out of the box. Embarcadero has committed to breaking speed records with their latest release.
Jim also was kind enough to reveal the full list of IDE Fix Pack changes that were implemented in 10.4.2, which I will re-list here:
Note that there are always some improvements made which might actually decrease performance of your particular environment. One such improvement is the package cache which was implemented in Delphi 2005 by Allen Bauer. It seems that you can often gain some increased IDE performance by disabling this package cache with the undocumented "-nocache" command line parameter. Similarly, some of the implemented IDE Fix Pack improvements may have positive or negative effects on your specific results. However, the improvements in 10.4.2 have proven to provide a very nice overall decrease in average build times with both the HeidiSQL and Spring4D tests. After 26 years of continuous Delphi development, it is likely very difficult to get performance increases across the board for all types of projects, but it does appear that Embarcadero has managed to achieve a nice balance in 10.4.2.
NOTE: A big thank-you out to Andreas Hausladen for his IDE Fix Pack efforts over the years! (And to Embarcadero for integrating, extending and supporting the changes going forward.)
If you'd like to discuss this release on Slack, here is a free invite link to a Delphi Programmers Slack Channel that was created recently and has grown to over 240 members. For those that prefer Telegram, there is a new Telegram Delphi Developer Group that has also grown to over 240 members. You can also reach me directly on Twitter or LinkedIn.
Update: test results from others
2021-03-08: Comment received from Andrew Holubovski on LinkedIn who reports 38% speed increase for Win32 and 24% speed increase for Win64.
2021-03-03: Twitter post from Roman Kassebaum states 10.4.2 is the fastest Delphi compiler I've ever seen! On his related blog post he reports a project with 2.3 million lines of code took 2.5 minutes to compile in 10.3.3 now compiles in 1.5 minutes with 10.4.2.
2021-02-28: Comment received from Dimitris Kounalakis on Facebook that compile time is 50% less for a big project.
Update: 10.4.2 compared to 10.3.3
2021-03-10: Comment received from Uğur Buğra Özkaya on LinkedIn about the availability of testing other versions like Tokyo or Rio, so I ran another batch of tests on Rio with all of the related updates (these results are from a fully patched version 10.3.3.) These builds were on an identically configured VM on the same host as the previous tests.
Delphi 10.3.3, Win32 build results
Time to build: 25003 ms
Time to build: 18894 ms
Time to build: 19026 ms
Time to build: 23441 ms
Average build time: 21591 ms
10.4.1 Win32 averaged 15232.5 ms so they had already gained very large increases in speed (29%) with the Sydney release before this big batch of IDE Fix Pack fixes in 10.4.2.
Compiling the same Win32 project in 10.3.3 versus 10.4.2 results in a 33% reduction in overall build time.
Delphi 10.3.3, Win64 build results
Time to build: 51825 ms
Time to build: 51395 ms
Time to build: 51065 ms
Time to build: 52610 ms
Average build time: 51723.75 ms
10.4.1 Win64 averaged 47667.25 ms so the earlier Syndey releases resulted in about 8% decrease in Win64 build time before this big batch of IDE Fix Pack additions in 10.4.2.
Compiling the same Win64 project in 10.3.3 versus 10.4.2 results in a 28% reduction in overall build time.