Flame bait: D vs. Rust vs. Go Benchmarking

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jul 24 12:54:19 PDT 2013


On 7/24/13 2:43 AM, monarch_dodra wrote:
> On Wednesday, 24 July 2013 at 07:20:16 UTC, Peter Alexander wrote:
>> This comment is worrying:
>>
>> "Can you try D version without std.random, and use srand and rand from
>> std.c.stdlib? I think it should be almost same speed as C version ;-)"
>>
>> "Wow! Just tried that, and this brings the running time of the
>> DMD-compiled version to 0.770s from 1.290, the GDC-compiled version
>> from 1.060 to 0.680s, and the LDC version to 0.580s from 0.710s.
>> Meaning the LDC version is on par with the Clang-compiled C version
>> and just slightly beats the GCC-compiled C one! There really should be
>> a warning note in the std.random library documentation that for
>> performance-critical code the C stdlib random generator is a better
>> choice."
>>
>>
>> Is this just because RNGs are value types? It's literally causing bad
>> press for D, so this needs to be high on the priority list.
>
> The whole of std.random is nothing but problems and pitfalls, biting us
> and our users on a regular basis :/

What are the other problems aside from value semantics?

Andrei


More information about the Digitalmars-d mailing list