Forum > Other

Integer Performance Test: Delphi 10.2 Tokyo outperforms Visual C++ and Visual C#

(1/6) > >>

As you know Delphi 10.2 Tokyo has been released recently. An author of had a pre-release version of Delphi and published results of an integer performance comparison test some time ago:

According to this test, latest version of Delphi performs better than Visual C++ on Win64 target. The test measures both single-thread and multi-thread performance, and Delphi has significant lead in both tests.

Since then the official release has been announced, and I installed Starter Edition. The source codes of this test are on Github, so I decided to give it a try. Meanwhile Visual Studio 2017 also released. Now we can see if C++ 2017 has any improvements.

Test setup:
RAD Studio 10.2 Starter, Delphi Version 25.0.26309.314
>> Supports only Win32 target.
Visual Studio Community 2017, Version 15.0.0+26228.9, .NET Framework Version 4.6.01586
>> Supports Win32 and Win64 targets for C++, only Any CPU for C#.
Lazarus 1.6.4 64-bit, SVN Revision 54278
>> Supports Win64 target, Win32 target needs add-on.

Desktop PC:
Windows 10 64-bit, Build 1607
AMD A10-7860K@3.8 GHz
16 GB 2133 MHz DDR3 RAM

I tried to use latest versions of development environments. On particular CPU I am using I got these results:

--- Any CPU ---
C# Serial 11344
C# Parallel 2921

--- Win32 ---
C++ Serial 11656
C++ Parallel 2937, 2984
Delphi Serial 11406
Delphi Parallel 3094, 2890, 2969
Lazarus Serial 11750
Lazarus Parallel 4656

--- Win64 ---
C++ Serial 11687
C++ Parallel 2922, 2969
Delphi Trial Serial 11203
Delphi Trial Parallel 3157, 2828, 2922
Lazarus Serial 11359
Lazarus Parallel 4250

In Delphi, there were 3 different methods to implement concurrency for the tested calculation. In C++, the author came up with 2 methods. Although Delphi Starter doesn't support Win64 target, Win32 test alone showed a very promising result. Lazarus is also following Delphi closely. Parallel code didn't work in Lazarus so I only did serial test, and it is 2.8% faster than C++ on Win64 target. I attached the Lazarus code I used.

You can also post your test results, especially if you have 64-bit Delphi, so we can have a better idea of latest situation. If you like you can post results of other benchmarks like SciMark too. It would be nice if we have a broader perspective of how latest compiler versions are performing.

When it comes to performance, Pascal compilers compete each other. There is no other competition ;)

Using the code suggested by ykot, multi-threading test for Lazarus was performed and results were updated. Compared to other products, the latest stable version of Lazarus has mediocre parallel processing speed.

I discovered that RAD Studio 10.2 Trial has Delphi Win64 compiler, so I added results for Delphi Win64.

You can download Delphi 10.2 Tokyo Starter here, it doesn't have a time limitation but it supports only Win32 target:

RAD Studio 10.2 Tokyo Architect Trial includes Delphi Win64 compiler and all cross-compilers:

What were your compiler settings?

FPC has more options and when I ran the test compiled with:

fpc -CX -XXs -Sv -CfSSE41 -CpATHLON64 -OpATHLON64 -Mobjfpc -OoFASTMATH -O4  benchint.lpr

It was another 4% faster compared to the default fpc -CX -XXs -Mobjfpc -O2 benchint.lpr

On my (very slow AMD E-2500) laptop FPC did actually better (23844) than Berlin (24719)  8-)


This is not an FPC test. Only Lazarus is tested. Modern IDEs have Debug and Release profiles. We switch to Release mode on each IDE. No other setting is modified. So this is a test of what you get "out of the box".


It is not a Lazarus program.
Lazarus uses the FPC compiler.
These compiler settings can all be set in Lazarus. What a stupid remark. >:D >:D

The performance comes from the compiler, not from Lazarus. You are testing performance, NOT an editor.

I never had a practical use for paralel for in ten years of programming. (while my apps are generally multithreading).

I always wonder a bit why people think it is so great? Anybody have real world examples?


[0] Message Index

[#] Next page

Go to full version