SamplingProfiler 24.11.26 update

A new version 24.11.26 of SamplingProfiler is available.

The only significant change in this version is the support for sampling code that is in “.inc” files in addition to regular “.pas” unit files. The file name is now actually tracked from the map file, while previously it was obtained by appending “.pas” to the unit name, so there may also be other files extensions that are supported now.

The Three Unities of Development

There are many patterns, principles, and development methodologies out there that are evangelized.

They can have fancy names, some are old, some are new. But they all boil down to just three “Unities”, which have nothing in particular to do with computing or development, and all to do with those that are doing development and design: humans.

You find those three Unities in practically all crafts.

(more…)

Supporting GPU Buffers for FMX

 

The FMXUtils repository now implements support for GPU Buffers for Delphi FMX (with DX11 or WebGPU).

Adding GPU buffers required some trickery and hackery, but the speedups can be massive: 2x to 3x speedups on low-end integrated GPUs, with reports of 20x (twenty times) speedups on discrete GPUs!

I tried to make the support as easy and backward compatible as possible, while dancing around missing private fields and non-virtual methods. (more…)

Exploring 3D Point Clouds for FMX

With Delphi 12.Community Edition released not too long ago, it was an opportunity to test run what’s possible with FMX on the 3D side.

And while Delphi FireMonkey has 3D support, it’s not really a core feature. For a test run, the simplest of all 3D entities, a point cloud can serve as a decent stress test.

Point Clouds are now ubiquitous with the advent of 3D capture devices, which go from LIDAR to RGB-D cameras and all kinds of AI augmented approaches. So there is a plethora of 3D point cloud datasets out there.

(more…)

Turning lowers to uppers without a branch

In another comment of the Curiouser Case, Arnaud Bouchez pointed to an interesting optimization that is use in mORMot‘s UpperCopy255Buf function: a branchless parallel upper case conversion.

At the core of that implementation are the following lines of code

c := src[i];
d := c or _80;
dest[i] := c - ((d - _61) and not (d - _7b)) and ((not c) and _80) shr 2;

Ok, it may not be too obvious what happens at first sight. Let’s break it down.
(more…)

The Mischievous Case-Insensitive Hash

In a comment to the previous article on a case insensitive hash code, Stefan Glienke pointed to an approach used in Spring4D’s comparers, which is a delightful hack.

Rather than converting the string to a “proper lower case”, it converts the string to an “approximate lower case” using an “or $20”, which happens to be good enough for a hash on string identifiers.

To figure the trick, one needs to check the ASCII Table. (more…)