just for curiosity I did a test to check the enhancements on the Delphi 64bit compiler 10.2.3...I have made a run of the good old poker benchmark of Charles, and compiled it without debug, full optimizations on the compiler and the linker. The code is good as bench the low level root pascal, FOR, WHILE, SET, TObject and TList nested iterations. Surprise: Delphi64 it's really impressive, it's 2.5x faster than the direct competitor FPC 3.1.1 64bit. Some user tells that's faster than VC benchs as mips, integer common tests... cheers! (tested over a i7 without threadpool parallel classes at all, so to see the raw single core speed)

just for curiosity I did a test to check the enhancements on the Delphi 64bit compiler 10.2.3...I have made a run of the good old poker benchmark of Charles, and compiled it without debug, full optimizations on the compiler and the linker. The code is good as bench the low level root pascal, FOR, WHILE, SET, TObject and TList nested iterations. Surprise: Delphi64 it's really impressive, it's 2.5x faster than the direct competitor FPC 3.1.1 64bit. Some user tells that's faster than VC benchs as mips, integer common tests... cheers! (tested over a i7 without threadpool parallel classes at all, so to see the raw single core speed)
www dot dellapasqua dot com / wldd49.rar

Comments

  1. Roberto Della Pasqua: Myself and many others have asked the same question, and the answer from the FPC team is always the same. FPC is no speed daemon. Maintainability is a higher priority than outright performance (it makes perfect sense compared to the human resources available and the amount of OS and CPU targets they support).

    Saying that, they do try and apply performance improvements where they can. FPC is no slouch either. FPC's "maintainability" sure has paid off many times over. They can add new OS targets, CPU targets etc in a fraction of the time it will take Delphi. Hell, you can even generate Java classes and JavaScript from your Object Pascal code now! I also think FPC's "objfpc" compiler mode is a much cleaner syntax than Delphi's. So there are lots of positives about FPC - raw speed is not everything.

    ReplyDelete
  2. Graeme Geldenhuys From my experiment, properly written code (e.g. about inlining and local variables mapped to registers) could make wonders in FPC. For x86/x86-64, asm generation is at the same level than Delphi, sometimes less (e.g. register allocation and unneeded register moves), sometimes more (e.g. inlining, optimized div per constant). For ARM, I don't know much but what I've seen in Delphi is not very clean (sounds like if they didn't use LLVM on its best). There is currently discussion in the FPC dev maillist about enhancing the register allocation for all targets, or other optimizations. As you said, I trust more FPC team to enhance their compiler than Delphi's.

    ReplyDelete

Post a Comment