| ▲ | cowlevel an hour ago | |||||||
Probably no optimization though, right? | ||||||||
| ▲ | hnlmorg 11 minutes ago | parent | next [-] | |||||||
Optimisations existed back then. But what Pascal did differently to a lot of modern languages was it only required a single-pass compiler and no macros. 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. | ||||||||
| ▲ | OskarS 26 minutes ago | parent | prev | next [-] | |||||||
Optimizations is one reason for modern languages to compile slowly, but it's certainly not the only reason. Even at -O0, C++ and Rust are much slower to compile. The culprits are more likely much more advanced type-systems and monomorphization passes for generics. Slow compile times are much more inherent to the languages (compared to Turbo Pascal, certainly). | ||||||||
| ||||||||
| ▲ | pjmlp an hour ago | parent | prev | next [-] | |||||||
There were optimizations already available. 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. | ||||||||
| ▲ | muyuu an hour ago | parent | prev [-] | |||||||
they are pretty minimal 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 | ||||||||
| ||||||||