3 ms·
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
by reacweb 11y ago
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.
- userbinator 11y agoIIRC the TP3 compiler was very fast because it didn't optimise much. Compilers at the time were far easier to beat with Asm than ones today. Also, as this is highly parallelisable problem, autovectorisation with SIMD instructions will produce huge performance boosts.
- vardump 11y agoCompilers 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.
- mmastrac 11y agoThe 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): https://grack.com/code/legacy/deathmatch3d/ https://grack.com/code/legacy/deathmatch3d/
- coliveira 11y agoAt 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.