Port a benchmark to D?
Daniel Gibson
metalcaedes at gmail.com
Sat Jun 4 08:01:25 PDT 2011
Am 04.06.2011 16:54, schrieb dsimcha:
> On 6/4/2011 9:15 AM, bearophile wrote:
>> Walter:
>>
>>> It would be nice to figure out what is different. Try using the coverage
>>> analyzer and profiler for starters!
>>
>> There are little differences and inefficiencies here and there, but in
>> the second D version I think most of the performance difference over
>> the C++ code is caused by the GC. I will do some tests.
>>
>> Bye,
>> bearophile
>
> That's probably right, for two reasons:
>
> 1. Other than the GC, D doesn't have any "hidden cost" features that
> would explain it being slower than C++ for similarly written code.
>
Besides better optimization by the compiler,
see Adam Ruppe's post, 3 posts up:
> On my computer, the D version ran slightly faster (56 seconds vs 63s >
for C++) without optimizations turned on.
>
> With optimizations turned on, C++ took a nice lead (28 seconds vs 53
> seconds for D).
So it seems like it's not all the GCs fault.
> 2. A few posts back, it was noted that DMD2.053, which includes my GC
> optimizations, was substantially faster than 2.052, which doesn't.
More information about the Digitalmars-d
mailing list