The generated code wasn't perfect, but you could always use assembler for short routines that needed faster code (e.g. loop-unrolling, tighter register usage, or 80386 32-bit register code, which I think TP never supported). There were also tricks that would improve performance (I seem to remember that 'repeat'/'until' was faster than standard 'for' loops).
To be honest, it was a very fast tool to work with (even on a 80286) -- The integrated debugger was a dream to work with for the time too.
I remember switching to C (both Turbo C and later gcc via DJGPP on both a 80386 and 80486). Compiling even standard C was agonizingly slow in comparison to TP, and you couldn't iterate as fast as TP. It was like moving from having fun programming to plain torture.
I moved on to fully embrace C later (and C++). As the computers got more RAM and got faster, it became a lot better experience, but I never fully understood why C was popular as a general purpose language in the 80s and 90s. I doubt C was optimal for development time.
TP was a really balanced compromise in a lot of ways.
Sure things were very spartan, but you could do a heck of a lot on what is basically a trumped up microcontroller. I have mostly felt that modern tech has been a step backwards - because the inner loop has so much latency. Turbo Pascal and Delphi were really leaders in this regard. Python and friends were good too (aside from the runtime errors!), but getting a real compiled and lean binary so quickly was a very special thing. I didn't enjoy moving to Java after that, especially in those early days.
If only I had known about TDD back then, I think ultra low latency compiles and fast running tests would be hard to beat.
Even if the basic ones that tend to be part of university compiler assignments, .e.g. peephole optimisations, constant propagation, inlining, bounds checking removal, redundant loads removal,....
See chapter 21 from Turbo Pascal 7 Language Guide, to use the last one for MS-DOS as example.
Similar build performance available in other languages, alongside a small set of optimisations.
It is a urban myth that we cannot have both, only because folks experience is tainted with C and C++ compilers.
If you want a good example of fast compilation times with optimisations enabled, check D reference compiler dmd, or to keep on the subject, FreePascal or Delphi 13.
On slow systems of the era, that vastly reduced the amount of work a compiler had to do to turn ASCII into machine code.
These days, compilers run macros, multiple passes of the source code. Often then building their own byte code or an interim machine representation, before turning that into machine code.
Those layers of abstraction aren’t without benefit. You get greater composability of code, greater portability, and so on and so forth. So they exist for a reason.
I think we could do something similar today - very fast compilation, and straightforward but efficient machine code. And perhaps bolt on the heavy duty optimizations where it is needed. Many JIT's work similar to this, but it seems like you could do it in an AOT style too.
Well, in a world where many among most used apps are made of NodeJS and Electron frontend, I think we are very far away from having to worry about those optimizations in most contexts. Having those written in TP with zero optimizations would still be more resource efficient and performant.
And when it comes down to squeezing last drop of performance, we forget compilers and still rely on assembly wizards tuning BLAS routines, crypto code etc.
It does make you wonder how much we could simplify and take away while still having things be blazing fast. I would assume some of the old optimizations are actually hurting things on newer architectures.
Or if you prefer to travel back to 1993, here is a developer experience using C++ as if it was Lisp Machine/Smalltalk environment with incremental compilation and hot code reloading.
"Lucid Energize Demo"
https://www.youtube.com/watch?v=pQQTScuApWk
With one of the very first ideas of a LSP could be like,
https://dreamsongs.com/Files/Energize.pdf
We got into a culture that accepted slow compilers is normal, it doesn't have to be.
I guess today if you want fast, optimized codegen you need to look more at JIT research since it seems the AOT compiler research seems as you say to have just accepted that slow compilers is normal.
A good mix is having a JIT/AOT combo, use JIT for the development workflow, and a full blown AOT with all possible optimisations turned on for production releases.
Yes, compiling Rust in the release mode could take long time and it would be worth all this baggage - monomorphization, trait resolution etc. But there is no reason, except not giving shit, to no have a fast and simple pipeline for debug builds.
the game back then was to use inline assembly for the critical bits, this really worked a treat for the meta of the 90s, with computers that were being asked for multimedia processing with slow CPUs, little RAM and typically no hardware acceleration
I wish I still had the code for it - because it had a very simple Wirth-style code generator it was predictable enough that you could even use registers directly in expressions. (M68k, so e.g. you could do "x = D7.w" to set the variable x equal to the low 16 bit word of register D7)
EDIT: Worth mentioning Randall Hyde's "High Level Assembly"[1] here as an actually published language that did something similar.