The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,517 other followers

Some links on Delphi compiler potential speed improvements…

Posted by jpluimers on 2021/11/04

A long time ago, there was an interesting blog post referenced from [WayBack] See how you can use Delphi’s upcoming new language feature to improve performance of your code. – Erik van Bilsen – Google+ referred to [WayBack] Inline Variables can increase performance – grijjy blog which made me comment [WayBack] “given the potential performance improvements the compiler already could do, and how long they could have been done, I would not bet on these new improvements becoming reality anytime soon.” that I later backed up with these links:

One of the observations there is that since Delphi 2005, no major compiler speed improvements have been done, and that even between Delphi 5 and 2005 mot much has been done either.

From my point of view, the – not so big – Delphi compiler team is very busy keeping balls up in the air supporting the many compiler targets and architecture changes that have been introduced over the past decade or so, that they do not have resources to improve code generation other than rely on the LLVM tool chain (which is not used for Windows x86 and x64 development that covers like 90+% of the Delphi users).

In my book, when you need an “inline var”, you usually want to refactor that bit of code into a separate method anyway.

Refactoring out parts of code that have implicit try/finally blocks for managed variables or records is a strategy that can improve execution speed in many Delphi applications anyway, especially if that piece of code is outside of the happy flow: it moves unneeded overhead out of that flow.

This is actually a strategy used for instance in the Spring4D library: Stefan Glienke has a very good insight in how the compiler works and did magic to some performance critical code paths there.

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

 
%d bloggers like this: