How to Optimize Delphi Application Performance to the Max using FastCode Library

If you believe you've optimized your Delphi application to the max, and there is no room for performance improvement, then you should check out following site: http://sourceforge.net/projects/fastcode

Project Fastcode is competition of assembler developers on rewriting certain Delphi RTL functions to processor-specific code, utilizing extra instruction sets like SSE, SSE2, etc. This way Fastcode winners achieve 2x-4x performance boost compared to classic i386 implementations.

Each function in Fastcode project has 5 variants, each variant is optimized for certain processor architecture:

  • {function_name}_Blended - optimized for <= Pentium processors (employs i386, MMX instruction sets)
  • {function_name}_Pentium3 - optimized for Pentium 3 processors (employs i386, MMX, SSE)
  • {function_name}_Pentium4Northwood - optimized for Pentium 4 processors, Northwood kernel (employs i386, MMX, SSE, SSE2)
  • {function_name}_Pentium4Presscot - optimized for Pentium 4 processors, Presscot kernel (employs i386, MMX, SSE, SSE2, SSE3)
  • {function_name}_AthlonXP - optimized for Athlon XP (employs 3D-Now)
  • {function_name}_Opteron - optimized for Opteron (employs ???)

I have put together a package allowing you start on using Fastcode just in 5 mins. It contains units that auto-determine your CPU type and auto-patch VCL to use Fastcode. The following Fastcode functions are included:

  • Move - 200% performance boost
  • FillChar - 200-400% performance boost
  • Pos - 200-300% performance boost
  • CompareText - 200% performance boost

I recommend using this package in non-GUI application servers, facilitating strong memory usage, etc.

Despite it will not make your application incredibly fast, overall speed up will be about 5%.

AttachmentSize
FastcodeGerasika.zip134.58 KB

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.