Re: Fastcode Library Design



Hi

Each library type has its own unique set of strengths and weaknesses. Help
me enumerate them.

Direct Calling:

Pro

Simple
The smallest possible exe
No additional RAM usage.
No extra indirection
The fastest possible.

Cons

Compiled for one target only
The unit can contain the same function multiple times if it is a winner on
multiple targets. This makes the unit bigger as necessary which takes up HD
space on the developer machine. Maintanence is simpler if only one copy of a
function is included.

Conditional Compilation:

Pro

The smallest possible exe
No additional RAM usage.
No extra indirection
The fastest possible.

Cons

Compiled for one target only

CPU ID based:

Pro

The fastest function for the given target is automatically used.

Cons

All functions are compiled into the exe -> a fat exe
Adds one extra layer of indirection.
Not as simple as Direct calling or conditional compilation.
Depends on the CPUID unit

Patching

Pro

All calls to RTL functions from within the RTL is replaced without the need
of the RTL to be recompiled.
The fastest function for the given target is automatically used.

Cons

A fat exe.
Adds one extra layer of indirection.
One function is 4 kB big in RAM always ????
All functions are loaded into RAM, even if not used.
Not all people feel comfortable with some "hacking" they do not understand.
A complex solution
Depends on the CPUID unit

Best regards
Dennis


.



Relevant Pages

  • Re: Fastcode Library Design
    ... Pro ... The smallest possible exe ... No additional RAM usage. ... Compiled for one target only ...
    (borland.public.delphi.language.basm)
  • Re: Unable to use Target - Run Programs to execute files
    ... an exe you better put even the relevant .pdb file ... I would like to use the Target - Run Programs option to test and Debug ...
    (microsoft.public.windowsce.platbuilder)
  • Re: outofmemoryexception
    ... outofmemoryexception when it uses up to about 1.5G RAM. ... the collection into 2 seperate EXE, one can load up to 1.2G and another 1.3G ... Windows) don't allow you to create objects larger than 2GB, so you will have to change your design. ...
    (microsoft.public.dotnet.framework.clr)
  • RE: how to start application at startup of booting time
    ... Create an empty subproject that will copy the .exe into the release ... DependsXX of the subproject registry to that of the shell.exe. ... then how to edit the registry, because it is loaded on ram. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Unable to use Target - Run Programs to execute files
    ... an exe you better put even the relevant .pdb file ... I would like to use the Target - Run Programs option to test and Debug ... I can activate a KITL connection, download my image and debug into kernel ...
    (microsoft.public.windowsce.platbuilder)