4 ms·
> Unfortunately this is something that no compiler I know of does Turbo Pascal (and Delphi), originally influenced by Wirth's books did exactly that. It was an
by mojuba 9y ago
> Unfortunately this is something that no compiler I know of does
Turbo Pascal (and Delphi), originally influenced by Wirth's books did exactly that. It was an incredibly fast compiler that generated surprizingly decent binaries.
- e12e 9y agoI've seen people imply that latest generation c compilers (gcc,clang etc) generate quite a lot better code than these previous generation compilers. Partly I guess turbo Pascal didn't to much auto vectorization for example. Unsure about loop unrolling. I'm sure it helped that Pascal had a IMNHO saner calling convention (more like the current amd64 convention) - so would utilise register for passing arguments rather than always using the stack.
- Narishma 9y agoI doubt vectorization (automatic or not) was relevant during Turbo Pascal's era.
- e12e 9y agoTrue, but it's relevant today (since around 1996 with the mmx instruction set). And if some people are arguing today that you can have single pass, fast and simple, and get ~max performance on modern architecture. I'm not saying you can't, I'm just saying that "as fast machine code as early 90s era c compilers" might not translate to as fast as today's c++ compilers machine code.