News for hackers. Stuff that matters.
Re:I stopped everything and started writing C again by saati on Wednesday March 12, 2025 @09:51AM (#43343253)
> 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.

Re:I stopped everything and started writing C again by kqr on Wednesday March 12, 2025 @11:03AM (#43344028)
On 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.)

Re:I stopped everything and started writing C again by wholinator2 on Wednesday March 12, 2025 @01:51PM (#43345864)
I'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
Re:I stopped everything and started writing C again by kqr on Wednesday March 12, 2025 @02:54PM (#43346496)
Given 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

Re:I stopped everything and started writing C again by thfuran on Wednesday March 12, 2025 @04:21PM (#43347291)
I don't think that's a good benchmark for a C discussion.
Re:I stopped everything and started writing C again by tempodox on Wednesday March 12, 2025 @02:07PM (#43346025)
> 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.

Re:I stopped everything and started writing C again by bee_rider on Wednesday March 12, 2025 @03:36PM (#43346873)
Another 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.