| Leave it to hackernews to be overly pedantic. Yes, obviously different languages will produce different assembly based on the language semantics. So you will get performance differences. And it's certainly possible for code written in Rust or Zig or Odin to be more performant then C code depending on how it's written. My point was about classes of languages (for lack of a better term). Loosely, from fastest to slowest you have: 1. Compiled languages (meaning straight to machine code) with manual memory management 2. Compiled languages with garbage collection 3. Languages that run in VMs but are AOT compiled or JITed 4. Purely interpreted languages. I acknowledge that not all languages fit nicely into these and there will be exceptions, but it's a convenient mental model that's close enough for these purposes. Languages in the first category are going to be the most performant. Obviously there will be some variation between them based on how the code is written, but unless it's written really poorly it's not going to drop into an entirely different category. Where as languages in other categories are going to be far more difficult if not impossible to get close to the same kind of performance. And there is no meaningfully huge jumps left after the first group. We are all the way down at optimizing assembly code, and that's where you start to hit physical limitations. Some number of operations have to be executed and the CPU can only execute them so fast. |