Libraries · Optimization · Uncategorized

High-Precision Floating-Point Types for Delphi

If Single and Double precision floating-point types don’t cut it for you, then the Neslib.MultiPrecision library may be just the thing. It provides up to 4 times the precision, while still being pretty fast compared to arbitrary precision libraries. Neslib.MultiPrecision Neslib.MultiPrecision is a personal project that adds two additional floating-point types for use with Delphi.… Continue reading High-Precision Floating-Point Types for Delphi

Libraries · Optimization · Tips & Tricks · Uncategorized

An XML DOM with just 8 bytes per node

I present a small XML library that parses or creates XML documents with an extremely light-weight DOM that uses just 8 bytes per node. This post shows some of the interesting algorithms that make this possible. Another XML Library? I know what you are thinking: not another XML library! And you would be right, especially… Continue reading An XML DOM with just 8 bytes per node

Optimization · Tips & Tricks · Uncategorized

Boost Mac performance with Metal and Delphi 10.4

Is your Mac app a little unresponsive or does it feel sluggish? Does your MacBook laptop turn into a lap-heater when running your app? Then the new Metal support in Delphi 10.4 may be just the thing for you and your customers! I have been given permission by Embarcadero to blog about this new feature… Continue reading Boost Mac performance with Metal and Delphi 10.4

Foundation · Optimization · Tips & Tricks · Uncategorized

Allocation-Free Collections

Say you have a method that creates a temporary list to gather some data. You calculate some statistics based on that data and then you destroy the list again. You call this method a lot, resulting in lots of memory allocations and deallocations and increased memory fragmentation. In addition, all this memory management takes time… Continue reading Allocation-Free Collections

Optimization · Tips & Tricks · Uncategorized

Inline Variables can increase performance

Delphi 10.3 Rio will add inline variables to the language. Besides the various benefits mentioned in Marco’s blog post that introduces the concept, inline variables can potentially improve performance of your code. It’s all about scope If you have been reading my articles, then you may know that I am a sucker for performance. That’s… Continue reading Inline Variables can increase performance

Optimization · Tips & Tricks · Uncategorized

Experiments in Uniform Memory Management

We experiment with algorithms to make memory management in Delphi more consistent between desktop and mobile platforms. This eases debugging and finding memory leaks. We look into using object interfaces and semi-automatic memory management based on ownership. Along the way, we touch on using linked lists and Delphi’s messaging framework. Warning: this post is more… Continue reading Experiments in Uniform Memory Management

Optimization · Tips & Tricks · Uncategorized

SIMD Assembly Optimization

We get close to the metal as we demonstrate how you can incorporate assembly optimized SIMD routines into your Delphi apps. This can be done by using inline assembly code for Intel platforms, or by creating and linking a static library for ARM platforms. Nowadays, with optimizing and vectorizing compilers, few people still hand-write assembly… Continue reading SIMD Assembly Optimization