It seems to me that there are no programming languages for which you generally compare the source code of similar programs and determine which will be faster because the speed of a program heavily depends on the compiler optimizations used.
If a language's standard specified the assembly instructions to produce, then we could compare programs more objectively.
@philipwhite This is an interesting idea, but breaks down when you have to consider multiple different CPUs. The nice thing about compilers choosing their optimisations is that you can also specifically optimise for e.g. AVX-512.
I think it would only work for more general optimisations like loop unrolling or general vectorization
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!