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

AMD Ryzen 9 5950x Powerhouse Compiles Three Fourths Of A Million Lines Of Delphi Code In 12 Seconds


Some of the latest hardware out on the market in late 2020 is the AMD Ryzen 9 5950x CPU and at the time of this writing has the fastest single thread CPU available according to PassMark benchmarks. Additionally, it also features 16 cores and 32 threads. I wanted to try running Delphi 10.4.1 on this new modern CPU and see what it can do. The comparison machine is a i7-3770 CPU (which came out in 2012) featuring 4 cores and 8 threads The main test for this post is to compile the open source Spring4D library using the AMD Ryzen 9 5950x and the i7-3770.

According to the PassMark score a i7-3770 has single thread score of 2069 and the Ryzen 9 5950x has a single thread score of 3524. This means the Ryzen 9 5950x is approximately 58% faster than the i7-3770 which came out 8 years ago. You can find out more about the AMD Ryzen line over on their site. You can find out more about the AMD Ryzen 9 5950x specifically as well.

Image curtesy of AMD

According to the Spring4D website it “is an open-source code library for Embarcadero Delphi 2010 and higher. It consists of a number of different modules that contain a base class library (common types, interface based collection types, reflection extensions) and a dependency injection framework.” I selected this library to use for testing as it uses some advanced Object Pascal language features which should give the compiler a workout. Spring4D requires TestInsight by default to compile. There are around 738,000 lines of code to compile in Spring4D when doing Build All (which includes the tests).

In 2016, Embarcadero’s Jim McKeeth created a video showing the main library of Spring4D (277k lines of code) being compiled in Delphi 10.1 Berlin in under 5 seconds.


The full specs on the AMD Ryzen 9 5950x machine are:

AMD Ryzen 9 5950x
64GB DDR4 3200MHz RAM
NVIDIA GeForce RTX 3070 8GB
Windows 10 Pro

The major specs for the i7-3770 machine are:

Intel i7-3770
Windows 10 Home

Here is the single core CPU ranking from CPU Benchmark:


The AMD Ryzen 5000 line of processors uses “Zen 3” core architecture which you can find out more about here. AMD has a YouTube video which explains the “Zen 3” architecture.

Now let’s get to the compilation in Delphi 10.4.1 of the Spring4D library. On the i7-3770 machine it takes around 20 seconds to compile the full library. The compilation is in Debug mode and the target platform is Win32. On the AMD Ryzen 9 5950x machine it takes around 12 seconds to compile the full library. The compilation is in Debug mode and a target platform of Win32 as well. The AMD Ryzen 9 5950x compiles Spring4D around 60% faster than the older i7-3770. Compiling to Win64 changes the compile times but with the few experiments I did the AMD Ryzen 9 5950x was still around 60% faster than the older i7-3770.


Spring4D has almost 750k (approximately ~738k) lines of code in the library and unit tests. This means on an AMD Ryzen 9 5950x CPU the Delphi 10.4.1 compiler compiles generics heavy Object Pascal code at around 61,500 lines per second or 1 million lines of generics heavy Object Pascal code in 16 seconds. Impressive!

There is still more fun to be had with the AMD Ryzen 9 5950x and building projects in parallel with tools for RAD Studio like Delphi Parallel Build and TwineCompile for C++ to fully utilize the 32 threads.

I hope that I have given you a glimpse into the time savings a modern CPU can have when building large Windows projects in the latest version of Delphi. Whatever your workload is with Delphi you can use the CPU Benchmark score to estimate your own compile time with an AMD Ryzen 9 5950x.

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

FMXExpress.com has over 600 articles with all kinds of tips and tricks for Delphi FireMonkey on Android, IOS, OSX, Windows, and Linux.
Related posts

Measure Heart Rate Using Delphi And C++ Builder With The Power Of ThingConnect IoT Device Component Pack


Create Enterprise-Grade WebSockets Based Apps With Powerful Components For Delphi


Incredibly Powerful Enhanced Terminal And Network Toolkit For Windows Is Built In Delphi

C++CodeRAD Studio

Learn How To Use C++ Explicit Virtual Overrides In Windows Development

Leave a Reply

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