Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
CodeDelphiRAD Studio

High-Performance FastMath Library For Math-Intensive Applications On iOS, macOS, Android, And Windows

FastMath is a Delphi math library from developer Erik van Bilsen who is Co Founder and Software Developer at Grijjy, inc. It is optimized for fast performance but that performance sometimes comes from not doing error checking and losing accuracy. According to the library it uses hand-optimized assembly code to achieve good performance. The accuracy loss is acceptable in some settings and not others which is one way that it differs from what is built into the Delphi RTL.

It’s a Delphi library, on 32-bit and 64-bit desktop platforms (Windows and OS X), this performance is achieved by using the SSE2 instruction set. On 32-bit mobile platforms (iOS and Android), the NEON instruction set is used for SIMD optimization.

On 64-bit mobile platforms (iOS), the Arm64/AArch64 SIMD instruction set is used.

There is no hardware accelerated support for the iOS simulator (it will use Pascal versions for all calculations).

As they say in the article on GitHub, FastMath is ideal for high-performance math-intensive applications such as multi-media applications and games. For even better performance, the library provides a variety of “approximate” functions (which all start with a Fast-prefix). These can be very fast, but you will lose some (sometimes surprisingly little) accuracy. On Github they also say that for gaming and animation, this loss in accuracy is usually perfectly acceptable and outweighed by the increase in speed. Don’t use them for scientific calculations though.

FastMath is licensed under the Simplified BSD License. Some of its functions are based on other people’s code licensed under the MIT, New BSD and ZLib licenses. Those licenses are as permissive as the Simplified BSD License used for the entire project.


If you need faster calculations which don’t need full accuracy take a look at this library.

Head over to GitHub and download the full source code for the cross-platform FastMath library for Delphi.

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Related posts

Day 3 – Learn to Code Summer Camp 2021 - Now with More C++!


Join us Live for Delphi, Training, Jobs, and Education on TCoffeeAndCode

DelphiRAD Studio

How To Validate And Lookup Global Phone Numbers In Your Apps


This Is How To Protect Your Source Code from Hackers

Leave a Reply

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