Thanks! Yes, the benchmarks (see in the paxCompiler distro) put it at about 3-4 times slower. In reality no matter what the results are, it will still be faster than your typical interpreted engine because it's natively compiled (only to get faster over time).

What's cool is the following methods I recently added to TPyroScript:

[pascal]function GetAddress(..)
function CallRoutine(...)
function CreateScriptObject(...)
procedure DestroyScriptObject(...)[/pascal]

With them you can get the address of a routine, variable or method in script. Create an instance of a script class, use GetAddress to get the address of a method and then use CallRoutine to directly call this method passing any params to it like you normally would do and can even get the return result if needed.

You can register your native class so they are visible from script (in the OnRegisterNative event handler). If you want you can have your native classe's update routine call the script class update routine, this way your logic can be in script and modifiable by the end user. Anything you want to customize can be in modifiable script code. Or, you can just compile the whole thing to a stand alone EXE.

To register a class type, you can do something like this:

[pascal]
var
N,H: Integer;
s: TPyroScript;
begin
s := TPyroScript.Create; // PGSDK will be registered for you when you create script object instance

N := s.RegisterNamespace(0, 'PyroResources');

{ TPyroLogFile }
H := s.RegisterClassType(N, TPyroLogFile);
s.RegisterHeader(H, 'constructor Create; override;', @TPyroLogFile.Create);
s.RegisterHeader(H, 'procedure Erase; virtual;', @TPyroLogFile.Erase);
s.RegisterHeader(H, 'function Write(const aMsg: string; const aArgs: array of const): string; virtual;', @TPyroLogFile.Write);
s.RegisterHeader(H, 'procedure SetFilename(const aValue: string); virtual;', @TPyroLogFile.SetFilename);
s.RegisterHeader(H, 'function GetFilename: string; virtual;', @TPyroLogFile.GetFilename);
s.RegisterProperty(H, 'property Filename: string read GetFilename write SetFilename;');
...
...
// add some code from disk file
s.AddCode('test.pas');

// add code from a resource file
s. AddCode(ziparchive, 'media/scripts/test.pas');

// compile code
if s.Compile then
begin
// run compiled code
s.Run;

// lets us save out the compiled image to disk
s.SaveCompiled('test.bin');

// or we can save out a stand alone exe
s.CreateExe('test.exe', exeCONSOLE, @versioninfo, 'iconfile.ico');
else
begin
// display errors
...
end;
FreeAndNil(Script);

end;[/pascal]

or you can create a derived version of TPyroScript and override the OnRegisterNative event handler and place your registration code there which is the preferred way of doing it because any time the script engine changes (after a Reset for example) it can register your native code automatically as needed. Remember too that all these classes are coming from the DLL via ECOM.

Sweet man, SWEET!