D perfomance

Arine arine1283798123 at gmail.com
Wed Apr 22 22:34:32 UTC 2020


On Wednesday, 22 April 2020 at 15:24:29 UTC, welkam wrote:
> On Wednesday, 22 April 2020 at 14:00:10 UTC, serge wrote:
>> My understanding that D is the language in similar ballpark 
>> performance league as C, C++, Rust.
> Equivalent implementation in C, C++, D, Rust, Nim compiled with 
> same compiler backend should give exact same machine code. What 
> you see in online language comparisons is mostly comparing 
> different implementations and how much time people spent on 
> optimizing.

Not quite. Rust will generate better assembly as it can guarantee 
that use of an object is unique. Similar to C's "restrict" 
keyword but you get it for "free" across the entire application.


More information about the Digitalmars-d mailing list