4 ms·
> You wrote code, you knew roughly which instructions it translated to, and there you went! This must have been a very very long time ago, with optimizing comp
by saati 2y ago
> You wrote code, you knew roughly which instructions it translated to, and there you went!
This must have been a very very long time ago, with optimizing compilers you don't really know even if they will emit any instructions.
- kqr 2y agoOn x86-type machines, you still have a decent chance, because the instructions themselves are so complicated and high-level. It's not that C is close to the metal, it's that the metal has come up to nearly the level of C! I wouldn't dare guess what a compiler does to a RISC target. (But yes, this was back in the early-to-mid 2000s I think. Whether that is a long time ago I don't know.)
- wholinator2 2y agoI'd call it a while ago, but not a long time. Long time to me is more like 70s or 80s. I was born in 1996 so likely I'm biased: "before me=long time". It would be interesting to do a study on that. Give the words, request the years, correlate with birthyear, voila
- kqr 2y agoGiven how fast our field grows, you might want to consider anything beyond 13 years "a long time ago", since only a tenth of us were around back then[1]. [1]: https://entropicthoughts.com/python-programmers-experience https://entropicthoughts.com/python-programmers-experience
- thfuran 2y agoI don't think that's a good benchmark for a C discussion, though it probably is for JS.
- tempodox 2y ago> I wouldn't dare guess what a compiler does to a RISC target. Just let your C(++) compiler generate assembly on an ARM-64 platform, like Apple Silicon or iOS. Fasten your seat belt.
- bee_rider 2y agoAnother way of looking at it (although, I’m not sure if I believe this, haha)—it might be easy to guess what the the C compiler will spit out, for the proprietary bytecode known as “x86.” It is hard to guess what actual machine code (uops) it will be jitted to, when it is actually compiled by the x86 virtual machine.