4 ms·
There are times that JIT'd C# out-performs AOT C#, so I'd avoid defaulting to recommending AOT. Assuming that AOT is faster is the same trap that C advocates fa
by xnorswap 26d ago
There are times that JIT'd C# out-performs AOT C#, so I'd avoid defaulting to recommending AOT. Assuming that AOT is faster is the same trap that C advocates fall into when thinking that other languages can only ever equal C on speed.
- Paul_Clayton 26d agoIf a language can produce the same machine code (including dynamic patching) as a second language, that second language can at best only equal the runtime characteristics of the first. The development and maintenance costs can be very different. I am not certain if C (apart from inline assembly) can generate all possible machine code, and some translations can be fragile (autovectorization, e.g.).
- xnorswap 26d agoWell indeed, which is why I don't really like talking about the "speed" of a language at all. What really matters is the characteristics of the idiomatic usage.
- Paul_Clayton 26d agoI would guess that rate of benefit relative to divergence from idiomatic purity might also be significant. If a little clutter gains a 50% improvement with language A but only a 10% improvement with language B, language B having a 15% advantage under idiomatic expression may not be that significant. But, yes, terms like "the speed of C" do not seem especially useful. Even "equal effort" ignores the complexity of the effort-to-benefit function as well as maintainability issues and other considerations like finding good programmers who want to use the language. Reality seems to be very complex.