I'm not sure if this code even uses the x87 opcodes or software emulation for the floats!
First of all, the source defines a "FloatType", which is set to "Real". But the real type is a 6-byte float type optimised for software floating point routines! I'd like to see the results when using the "Single" and "Double" types.
Also, it's easy to forget that x87 code generation in TP3 is an option that defaults to "don't".
Hehee, my dad ended up buying some demo/test machine from AST in 92 or so. The comp had quite high end specs for it's time. It actually ran really fine for long time because of switching to Linux. Stopped using it in 1998. Probably could still remember all the IO, DMA, IRQ settings for hardware ^___^
I am a bit surprised by the bad performances of TP3. I remember that it was difficult to beat the compiler by using hand written assembly. Recent compilers may be far better than I imagined.
The TP compilers were pretty bad, all the way up to TP7. I (tried to) write a clone of Wolfenstein back in the day and the only way I could get close to the performance of the real Wolf3D was by replacing the inner loop by raw x86.
I even still have the source (keep in mind this was written ~20 years ago):
Compilers have been always pretty easy to beat. IIRC, Turbo Pascal time inline assembler could beat the compiler in tight loops 3-10x pretty easily. In things like sprite engines and texture mapping.
At the time, even C/C++ compilers had little memory available to perform any meaningful optimization. GCC on UNIX, for example, had optimizations that would be unthinkable for C compilers running on DOS. Microsoft was the first to invest in better optimization for Windows, and since then TC++ was left in the dust.
First of all, the source defines a "FloatType", which is set to "Real". But the real type is a 6-byte float type optimised for software floating point routines! I'd like to see the results when using the "Single" and "Double" types.
Also, it's easy to forget that x87 code generation in TP3 is an option that defaults to "don't".