I’ve made some informal performance tests on DWS vs PascalScript vs Delphi.
The PascalScript version was downloaded yesterday, though when compiling, I got many warnings hinting its code hasn’t been fully upgraded to Unicode and D2009, so maybe it wasn’t the latest version? I’m not a user of PascalScript, so if anyone want to chime in, feel free!
The script I used for testing was something like
var s, i: Integer; for i:=1 to 1000000 do s:=s+i;
with only minimal syntax adaptations to get it running and compiling in the various environments. For PascalScript, I tweaked the “sample1” project to run the script, so maybe there were some optimization options not active? If so, let me know!
The result timings on my machine were (including compilation and execution, except for Delphi):
Delphi: <1 msec (using 32bit integers), 1.5 msec (using 64bit integers)
DWS2 revival: 150 60 msec in D2009 (using 64bit integers)
DWS2 vanilla: 420 msec in D7 (using 32bit integers)
PascalScript: 1860 msec in D2009, 1490 msec in D7 (using 32bit integers)
Note that in DWS2 revival, integers are 64bit integers (more on that and other changes later).
I then redid the test using a double precision float for the “s” variable: Delphi goes up to 15 msec, DWS2 revival increases to 180 95 ms (vs 670 ms for vanilla), PascalScript results were unchanged.
Last test consisted in moving the “s:=s+i” to a function, to measure the call overhead. Delphi laughed at me and stayed with roughly the same figures, PascalScript went up to 3000 msec, and DWS2 revival took a hit to 1000 msec. Function calls are indeed a DWS area with still some simplifications and optimizations potential 😉
As for the re-release time-frame, I’m waiting to hear from the original maintainers, as well as removing a few dependencies to make it into a standalone library (currently the compiler itself is standalone, but the DWS library equivalents of system & sysutils units aren’t).
edit 2010-09-01: following a round of cleanup and optimizations, figures for DWS revival are now 60 and 95 msec for 64bit integers and floats respectively.