The project is organized as a competition divided into challenges. Each challenge takes one function and optimizes it against a number of targets. The project provides tools for benchmarking and validating each function contribution. One point is given per contribution and ten points are awarded for a target winner. A list with all contributors and their scores is maintained, and at the end of each year, until 2008, a winner was celebrated. Borland, Codegear and Embarcadero, the owners of Delphi and C++ Builder, have historically sponsored prizes. The majority of participants in the competition are assembler developers who often utilize processor-specific 32-bit code and extra instruction sets, such as MMX, SSE, SSE2, SSE3, SSSE3 and SSE4. The project enjoys the support of Embarcadero who recognizes the contributions of the FastCode team and incorporates their code into the codebase for Delphi. The default memory manager for Embarcadero Delphi, FastMM4, is the winner of the FastCode Memory Manager challenge. The project was first hosted on Robert Lee's OptimalCode site, and its source code's home page is , last updated in 2008. The source code contains both the enhanced routines and the testing suites to benchmark the routines. In 2017, the benchmark routines for Move, FillChar and the memory manager have been ported for 64-bit, available at .
Testing
The FastCode project puts a lot of effort into testing and focus is on providing very high quality software. Testing is split into two categories - testing for correctness and testing for speed.
Validation
Validation is done on all CPUs from the target set and very often on other CPUs and OSs as well. Validation is done across many different function inputs, both normal usage cases and error usage cases. Validation is done against known correct values and against reference implementations such existing RTL functions.
Benchmarking
Benchmarking is done on all the CPUs that are part of the current target set at the given time. These CPUs have been or are part of target sets:. Great care has been taken to make the benchmarks stable and realistic. Especially the memory manager challenge benchmark was hard to get fair and memory manager usage logs were made from normal usage of real world applications, and then played back by the benchmark.
Targets
Testing done on the entire targetset. A new targetset is decided each year from a poll where the FastCode community can vote. A targetset will typically consist of six CPUs, where four are from Intel and two are from AMD. This ratio has been selected to mimic the marketshares. In addition to these six CPU targets there are ten targets defined as a blend of the six CPUs. These ten targets are called computed targets and can be speed only or a combination of speed and size. The maximum allowed instruction set is different for each target. A target could be "IA32 size penalty" or "SSE2". The penalty for size is decided for each challenge by a poll.
The Mastering Delphi books by Marco Cantu contains a chapter about FastCode listing the contributions to the Delphi RTL.
The FastCode Library
All the challenge winners are included in the FastCode library calling functions directly, and 2) using the patching functionality. When calling functions directly it is entirely up to the application developer to call the version of a function he thinks is fastest. When using the patching functionality the library automatically detects the CPU type at application load, and uses this information to redirect all function calls to the FastCode winner function for that specific CPU.
FastMM4 Memory Manager
The FastMM memory manager used by Delphi and C++ Builder since 2006 is also the winner of a FastCode competition. It replaced the standard memory manager of Delphi and is not only less prone to memory fragmentation, it also provides improved debugging possibilities like being able to report memory leaks when the application is being closed, detecting use after memory release or double releases. FastMM4 is also used as memory manager for applications developed in Lazarus. FastMM4 is often listed as a "must have" tool for Delphi developers. Nexus DB comes with FastMM4 integration for leakchecking. FastMM usage is documented in "The New Memory Manager In BDS 2006".
Applications using FastCode
An application developed in Delphi or C++ Builder will typically use the default memory manager which is FastMM4. FastCode functions in the RTL have been selected to be the most commonly used ones and an application will also typically use some of these, especially if any string handling is done. Most Delphi/C++ Builder applications will therefore use code developed by the FastCode project. Some examples are Skype, FL Studio, and Embarcadero’s own RAD Studio. describes FastMM4 and why it is being used as the memory manager in application.