How to build Libraries

How to make a "Direct Calling" library.

-Get the template
-Decide which library to do (CompareStr is the example I use)
-Save template as "FastcodeCompareStrUnit.pas"
-Correct the date //Last update 12/9 2005
-Download the CompareStr B&V
http://fastcode.sourceforge.net/challenge_content/CompareStr.html
-Get the function interface "function CompareStr(const S1, S2: string):
Integer;"
-Change the template interface "function/procedure TemplateFastcodeP4P();"
to "function CompareStrFastcodeP4P(const S1, S2: string): Integer;"
-Do this for all 9 interfaces
-Copy the correct function declarations to the implementation part.
-See the names of the winner functions at the challenge homepage
http://fastcode.sourceforge.net/challenge_content/CompareStr.html
-Get the winners one by one from the B&V and copy them into the library
unit.
-Fill out the function info block. Author name comes from the challenge
homepage http://fastcode.sourceforge.net/challenge_content/CompareStr.html, Date
might be unknown, Instructionset(s) comes (partly) from the function name,
Original name ....

Template:

//Author:
//Date:              25/5 2004
//Optimized for:     Intel P4 Prescott
//Instructionset(s): IA32
//Original name:

function CompareStrFastcodeP4P(const S1, S2: string): Integer;
function CompareStr_PLR_IA32_13a(const S1, S2: string): Integer;

//Author: Pierre le Riche
//Date:              unknown
//Optimized for:     Intel P4 Prescott
//Instructionset(s): IA32
//Original name: CompareStr_PLR_IA32_13

-Delete the original function declaration
-Compile
-Release
-Test

How to build a conditional compilation library unit:

-Download the template unit called FastcodeTemplateCC01.pas
-Decide which unit to make. We use CharPos as example
-Save template as FastcodeCharPosCC01.pas
-Correct //Last update 12/9 2005
-Start change log : //12/9 2005: Initial version 0.1 made by Dennis
Christensen
-Change the template function declaration to "function CharPosFastcode(Ch :
Char; const Str : AnsiString) : Integer;"
-Copy paste all the winner functions from the direct calling library into
this unit between the correct compiler defines
-Rename all functions to "function CharPosFastcode(Ch : Char; const Str :
AnsiString) : Integer;"
-Try compile with no defines enabled. This should fail.
-Compile once with each compiler define enabled
-Enable the "Blended" compiler directive and disable all other.
-Test
-Release

Regards
Dennis