News for hackers. Stuff that matters.
Re:Compiler Construction: The Art of Niklaus Wirth (2000) [pdf] by mojuba on Sunday March 18, 2018 @05:25AM (#16611118)
> 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.

Re:Compiler Construction: The Art of Niklaus Wirth (2000) [pdf] by e12e on Sunday March 18, 2018 @07:25AM (#16611432)
I'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.

Re:Compiler Construction: The Art of Niklaus Wirth (2000) [pdf] by Narishma on Sunday March 18, 2018 @07:45AM (#16611500)
I doubt vectorization (automatic or not) was relevant during Turbo Pascal's era.
Re:Compiler Construction: The Art of Niklaus Wirth (2000) [pdf] by e12e on Sunday March 18, 2018 @10:27AM (#16612051)
True, 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.