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 created by Erik van Bilsen, Co-Founder and Software Developer at Grijjy, Inc. It is optimized for speed, but that speed is sometimes at the expense of accuracy due to insufficient error checking. According to the library, it achieves good performance by using hand-optimized assembly code. One way it differs from what is built into the Delphi RTL is that accuracy loss is acceptable in some settings but not in others.

This performance is achieved by using the SSE2 instruction set on 32-bit and 64-bit desktop platforms (Windows and OS X). The NEON instruction set is used for SIMD optimization on 32-bit mobile platforms (iOS and Android).

The Arm64/AArch64 SIMD instruction set is used on mobile platforms (iOS).

The iOS simulator does not support hardware acceleration (it will use Pascal versions for all calculations).

FastMath, as stated in the GitHub article, is ideal for high-performance math-intensive applications such as multimedia applications and games. The library includes a number of “approximate” functions to improve performance even further (which all start with a Fast-prefix). These can be very fast, but accuracy suffers (sometimes surprisingly little). According to Github, this loss in accuracy is usually perfectly acceptable for gaming and animation and is outweighed by the increase in speed. However, do not use them for scientific calculations.

FastMath is released under the terms of the Simplified BSD License. Some of its features are based on code licensed under the MIT, New BSD, and ZLib licenses. These licenses are just as permissive as the Simplified BSD License, which was used for the entire project.

fastmath

If you need faster calculations that 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.

Do you want to build High-Performance FastMath Library For math-intensive Applications On iOS, macOS, Android, And Windows? Try the Native Windows Development tool, which will assist you in developing apps in different operating systems.


What's Coming in Delphi, C++Builder, and RAD Studio 11.2 Alexandria

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

Leave a Reply

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

IN THE ARTICLES