3 ms·
> The nubbin of the debate was Steve's defense of not having to build optimizers anymore because the programmer would take care of it. C compiler development h
by kazinator 3y ago
> The nubbin of the debate was Steve's defense of not having to build optimizers anymore because the programmer would take care of it.
C compiler development has forgotten this. C compilers must not be too clever in optimizing. They should generate tidy code that allocates registers well, and puts local variables into registers well, and peepholes away poor instruction sequences. But all the memory accesses written in the program should happen.
Maybe Steve and all the early C people were philosophically wrong, but that's the language they designed; it should have been respected. In C, how you write the code is supposed to matter, like in assembly language.
- pjmlp 3y agoThe problem with this approach, as anyone coding on 8 and 16 bit home computers is well aware, anyone with a medium skill level in Assembly programming could easily outperform code generated from classical C compilers, and compiler vendors had to win those compiler benchmarks on computer magazines, so optimize exploring every UB trick in the book they did.