3 ms·
There's no reason to believe that the language would be. Performance of the compiled code clearly depends on the quality of the compiler. Iirc, Turbo Pascal p
by guenthert 5y ago
There's no reason to believe that the language would be. Performance of the compiled code clearly depends on the quality of the compiler. Iirc, Turbo Pascal passed arguments to functions in registers when it could, C compilers back then didn't. Pascal's calling convention also used less space (hence it being an optimization option on some C compilers). On a 8 bit machine, that was important, less so on the 32 bit machines of the 90s.
In the eighties C was considered slow. If you needed performance, you coded (the relevant part) in assembly (or machine code). C actually allows you (for the better or worse) to incorporate assembly code right within a C program, a desirable feature then. Turbo Pascal (on CP/M) only offered the same for machine code.
While I was fond of Turbo Pascal in its days, C was just so much more flexible.