I wonder how fast we'd do

Guillaume Piolat first.last at gmail.com
Tue May 28 14:20:30 UTC 2019


On Tuesday, 28 May 2019 at 09:49:26 UTC, Atila Neves wrote:
>
> Much to my surprise, C, C++, D and Rust all had the same 
> performance as each other, independently of whether C++, D and 
> Rust used ranges/algorithm/streams or plain loops. All done 
> with -O2, all LLVM.

This really isn't _that_ surprising.

Once properly optimized, native code is the same speed for every 
input language.
C, C++, D and Rust all have a "no room below" ethic in most 
cases, so you end up with the very same performance. Barring 
anomalies like bounds check or integer overflow checks.

Comparisons of backends would be much more interesting, but drive 
less interest on Internet forums.


More information about the Digitalmars-d mailing list