David Nadlinger:

Alpha-quality binary packages are available as part of 0.11.0 Beta 3: http://forum.dlang.org/post/[email protected]

I have done few small tests:

With no optimization dmd compiles about twice faster (or more) than ldc2.

When I want optimizations with this ldc I have used "-release -profile-verifier-noassert -O5". Is this good enough?
I don't know why ldc2 doesn't have "-noboundscheck".

- - - - - - - - - - - -

Regarding run time performance of the D code, if Walter is interested I have seen this code is about 6 times faster compiled with ldc2 compared to dmd:


import core.stdc.stdio, std.random, std.conv;

void main(in string[] args) {
immutable uint N = (args.length == 2) ? args[1].to!uint : 1_000;
    auto rng = Xorshift(0);

    uint total = 0;
    for (uint i = 0; i < N; i++)
        total += uniform(0, 10, rng);

    printf("%u\n", total);
}


If I replace this line:
total += uniform(0, 10, rng);

with:
total += rng.front;  rng.popFront;

Then the code compiled with ldc2 is only about 30% faster or so.

Bye,
bearophile

Reply via email to