August 23, 2014
Author posted part 2 http://tomerfiliba.com/blog/dlang-part2/
August 23, 2014
On 8/23/14, Adam D. Ruppe via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote:
> Author posted part 2 http://tomerfiliba.com/blog/dlang-part2/

If I read that right it seems they're using D in his startup? Pretty cool. A bit of googling reveals the company's name is "Weka.IO".
August 24, 2014
On Saturday, 23 August 2014 at 16:28:33 UTC, Adam D. Ruppe wrote:
> Author posted part 2 http://tomerfiliba.com/blog/dlang-part2/

In reddit thread one of commenters complained about D performance and linked this benchmark : https://github.com/nsf/pnoise

I tried running it and don't see anything inherently wrong that may justify 3x-5x slowdowns compared to clang / gcc versions - however, it does plenty of floating point math I don't know performance implications of. Maybe someone else can have a look what can be a problem?
August 24, 2014
On Sunday, 24 August 2014 at 02:19:18 UTC, Dicebot wrote:
> On Saturday, 23 August 2014 at 16:28:33 UTC, Adam D. Ruppe wrote:
>> Author posted part 2 http://tomerfiliba.com/blog/dlang-part2/
>
> In reddit thread one of commenters complained about D performance and linked this benchmark : https://github.com/nsf/pnoise
>
> I tried running it and don't see anything inherently wrong that may justify 3x-5x slowdowns compared to clang / gcc versions - however, it does plenty of floating point math I don't know performance implications of. Maybe someone else can have a look what can be a problem?

I believe that was previously discussed here:  http://forum.dlang.org/post/lo19l7$n2a$1@digitalmars.com.

Mike
August 24, 2014
Dicebot:

> In reddit thread one of commenters complained about D performance and linked this benchmark :

That benchmark found a small performance bug in ldc2, that I reported, but I think it's not yet fixed.

Rust has fixed a different smaller performance bug uncovered by that benchmark.

Bye,
bearophile
August 24, 2014
On 2014-08-24 10:53, bearophile wrote:
> Dicebot:
>
>> In reddit thread one of commenters complained about D performance and
>> linked this benchmark :
>
> That benchmark found a small performance bug in ldc2, that I reported,
> but I think it's not yet fixed.

The numbers in the benchmark has just been updated. DMD is behind C. GDC is the fastest of all and LDC is ahead of Clang but behind GCC. Seems pretty good to me.

-- 
/Jacob Carlborg
August 24, 2014
On Sunday, 24 August 2014 at 09:24:55 UTC, Jacob Carlborg wrote:
> The numbers in the benchmark has just been updated. DMD is behind C. GDC is the fastest of all and LDC is ahead of Clang but behind GCC. Seems pretty good to me.

D and C versions use different random number generators.
August 24, 2014
On Sunday, 24 August 2014 at 09:24:55 UTC, Jacob Carlborg wrote:
> On 2014-08-24 10:53, bearophile wrote:
>> Dicebot:
>>
>>> In reddit thread one of commenters complained about D performance and
>>> linked this benchmark :
>>
>> That benchmark found a small performance bug in ldc2, that I reported,
>> but I think it's not yet fixed.
>
> The numbers in the benchmark has just been updated. DMD is behind C. GDC is the fastest of all and LDC is ahead of Clang but behind GCC. Seems pretty good to me.

I did some analysis to find out which changes made the difference.  Here's my result.

1. Disabling the GC - insignificant
2. Liberal use of `immutable` - insignificant
3. Decorating functions with @trusted, @safe, nothrow, pure - insignificant
4. Using C's random number generator for both D and C - insignificant
5. Using C's floor instead of D's floor. - very significant (why?)
6. This change (https://github.com/nsf/pnoise/commit/baadfe20c7ae6aa900cb0e4188aa9d20bea95918) - very significant.

Mike

August 24, 2014
On Sun, 24 Aug 2014 12:51:10 +0000
Mike via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com>
wrote:

> 5. Using C's floor instead of D's floor. - very significant (why?)
gcc/clang inlines floorf().

gdc generates calls to floor() in both cases, C floor() is just faster.
i.e. gdc fails to see that floor() can be converted to intrinsic.

the same thing with DMD i believe.


August 24, 2014
On Sun, 24 Aug 2014 12:51:10 +0000
Mike via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com>
wrote:

ps.
> 6. This change (https://github.com/nsf/pnoise/commit/baadfe20c7ae6aa900cb0e4188aa9d20bea95918)

with GDC has no effect at all.