On Sunday, 24 August 2014 at 09:24:55 UTC, Jacob Carlborg wrote:
On 2014-08-24 10:53, bearophile wrote:
In reddit thread one of commenters complained about D
linked this benchmark :
That benchmark found a small performance bug in ldc2, that I
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 -
4. Using C's random number generator for both D and C -
5. Using C's floor instead of D's floor. - very significant (why?)
6. This change
- very significant.