4 ms·
I propose that, instead of it being a wording change that sparked the current “craziness” of optimizing C compilers it was the combination of two things: 1) F
by oddity 8y ago
I propose that, instead of it being a wording change that sparked the current “craziness” of optimizing C compilers it was the combination of two things:
1) Faster CPUs and more memory allowing compilers to step beyond mostly just peephole-optimization to do optimizations that were once prohibitively expensive.
2) The general convergence of mainstream processors on more or less identical characteristics (16/32/64 bit registers, MMUs giving the appearance of a flat memory space, code exists in memory, 2s complement, etc...) causing programmers to forget how truly diverse computers can be.
In effect, as a collective, we’ve forgotten why these parts of C were never defined and now that compilers are smart enough to optimize code in magical ways but not smart enough to perfectly verify that the programmer didn’t make a mistake, we have this situation of terrible UX and programming pitfalls.
I’m conflicted, and it feels wrong to say this, but maybe it is time to accept that all the world’s more or less an x86 and spin off a more well defined C that’s perf-optimal under some compilation settings for x86-likes. Everyone else not in the sanctioned-land would write code in their own dialect of C with well defined characteristics or limitations for their now-obscure architecture. There are a couple other issues that would need to be resolved, but in some sense, this is already the world we live in.
Except, what about this new web architecture? Do we consider the problem of compiling C to it impossible until we’ve extended it to the point that the semantics are similar to x86?
- iainmerrick 8y agoArguably also 3) the desire to look good on benchmarks, and to take the performance crown from FORTRAN.
- pjmlp 8y agoIt surely takes the security exploit crown.