Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
News

Coming in RAD Studio 13.2: Faster Builds and Faster Applications with Delphi’s LLVM-20 Compilers

Parallel code generation, LLVM optimizations, and memory-manager changes for Linux Intel 64-bit and Windows Arm64EC.

Feature Preview: This blog post is based on a pre-release version of the RAD Studio software and it has been written with specific permission by Embarcadero. No feature is committed until the product GA release.

In the previous post I discussed the reworked Delphi compiler for Linux Intel 64-bit. That compiler and the Delphi compiler for Windows Arm64EC are now based on the same LLVM 20 generation, allowing our R&D to share compiler work across both platforms.

When we discuss compiler performance, there are two separate questions: 1) How long does it take to build the application? and 2) How fast is the code the compiler produces after it’s built? The newer LLVM offers superior optimization, but that also requires the compiler to do more work, taking more time. Our team is putting in a significant effort to address both sides.

Parallel Code Generation (A First for Delphi)

The 64-bit compiler executables can now generate code for multiple Delphi units in parallel. By default, the compiler selects a worker count based on the available processor cores. You can override that globally, per project, or on the command line, including disabling parallel generation when you need to isolate a compiler issue.

The new “Number of workers” option in the Tools Options dialog box

Notice that this feature isn’t supported in the 32-bit versions of the compilers and in the 32-bit IDE, as it requires more memory and it will likely exceed available memory when building large applications.

The improvement depends heavily on the project and build configuration. In one internal test, rebuilding the FireMonkey units on a 10-core Intel Core i9-13900H system was about twice as fast for Debug and about 14 times as fast for Release. I would not use those numbers as a standard for every project. However, they do show why parallel work is especially important for optimized Release builds, where LLVM has considerably more work to do and would be quite slow without this feature.

What the New Optimizer Changes

For both Linux Intel 64-bit and Windows Arm64EC, the compiler front end can now feed Delphi code through a broader set of LLVM IR optimization passes. This includes exception handling, which is one of the areas where language semantics and a generic optimizer need to agree precisely.

Many of our tests show runtime improvements in the two-to-four-times range, with a specific Conway’s Life test reaching roughly seven times. Release compilation on Arm64EC can take longer with the new optimizations enabled – in current tests, around 34 to 42 percent longer before parallel code generation is taken into account. That is a fair tradeoff: spend more compiler time to produce faster code, then use the available CPU cores to reduce the wait.

Memory Managers on Arm and Linux

We have also ported Delphi’s FastMM4-based memory manager to Windows Arm64EC and made it the default there. The original platform allocator we shipped in 13.1 was particularly slow at some reallocation patterns, including repeated string concatenation. FastMM delivers more balanced behavior and retains the leak reporting Windows Delphi developers are used to.

In addition to FastMM4, the team is introducing the rpmalloc memory manager, available as an alternative on both Arm64EC and Linux Intel 64-bit. In our tests it has been stable and can be very fast in heavily multithreaded allocation workloads – sometimes from two to 30 times faster, depending on the test. The tradeoffs are higher memory use, often twice as much, and no equivalent built-in leak report. This is why it remains a choice rather than the default.

Runtime Packages and Other Windows on Arm Work

Alongside the compiler changes, we are continuing to fill out the Windows Arm64EC platform. The primary enhancement is a feature that wasn’t included in 13.1: support for runtime packages. 

Runtime packages configuration for the Windows on Arm platform

Runtime packages are not the only improvement in the Windows on Arm platform: the team also worked to deliver improvements in floating-point, handling of generic-heavy code, static-library compatibility, resources, linking, exception handling, imported functions, and debug information. Most of these items are not headline features, but together they determine whether an existing Delphi application can move to the platform without surprises.

This and the previous blog post roundup the Delphi compiler work coming in RAD Studio 13.2. But that’s not the only area of improvement, of course. I’ll write more on other 13.2 product enhancements soon.

Feature Preview: This blog post is based on a pre-release version of the RAD Studio software and it has been written with specific permission by Embarcadero. No feature is committed until the product GA release.

Kai 1.1 Now Available! What's Coming in RAD Studio 13.2 Florence

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.

Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Marco is one of the RAD Studio Product Managers, focused on Delphi. He's the best selling author of over 20 books on Delphi.

1 Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES