You could enable optimizations. Turbo Pascal generated pretty fast production code in general, and you could also disable run-time checks like range checking etc.
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.
For some reason they forced us to use these ancient 8088 machines (in 1996 no less!) at my school. Even there, the speed of Turbo Pascal was just incredible!
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.