D perfomance

mipri mipri at minimaltype.com
Fri Apr 24 23:24:49 UTC 2020


On Friday, 24 April 2020 at 19:27:40 UTC, Arine wrote:
> Rust:
>
>     pub fn foo(x: &mut i32, y: &mut i32) -> i32 {
>         *x = 0;
>         *y = 1;
>         *x
>     }
>
> example::foo:
>         mov     dword ptr [rdi], 0
>         mov     dword ptr [rsi], 1
>         xor     eax, eax
>         ret

eh, this isn't Rust; it's "Rust +nightly with an unstable codegen 
flag."

Marginal codegen improvements aren't going to turn heavy usage of
dynamic arrays into heavy usage of std.container.array either, so
they're not that relevant to expected performance of real-world
programs in D vs. other languages.



More information about the Digitalmars-d mailing list