December 22, 2014
On Monday, 22 December 2014 at 17:16:05 UTC, bachmeier wrote:
> On Monday, 22 December 2014 at 17:05:19 UTC, Iov Gherman wrote:
>> Hi Guys,
>>
>> First of all, thank you all for responding so quick, it is so nice to see D having such an active community.
>>
>> As I said in my first post, I used no other parameters to dmd when compiling because I don't know too much about dmd compilation flags. I can't wait to try the flags Daniel suggested with dmd (-O -release -inline -noboundscheck) and the other two compilers (ldc2 and gdc). Thank you guys for your suggestions.
>>
>> Meanwhile, I created a git repository on github and I put there all my code. If you find any errors please let me know. Because I am keeping the results in a big array the programs take approximately 8Gb of RAM. If you don't have enough RAM feel free to decrease the size of the array. For java code you will also need to change 'compile-run.bsh' and use the right memory parameters.
>>
>>
>> Thank you all for helping,
>> Iov
>
> Link to your repo?

Sorry, forgot about it:
https://github.com/ghermaniov/benchmarks

December 22, 2014
So, I did some more testing with the one processing in paralel:

--- dmd:
4 secs, 977 ms

--- dmd with flags: -O -release -inline -noboundscheck:
4 secs, 635 ms

--- ldc:
6 secs, 271 ms

--- gdc:
10 secs, 439 ms

I also pushed the new bash scripts to the git repository.
December 22, 2014
On Monday, 22 December 2014 at 17:28:12 UTC, Iov Gherman wrote:
> So, I did some more testing with the one processing in paralel:
>
> --- dmd:
> 4 secs, 977 ms
>
> --- dmd with flags: -O -release -inline -noboundscheck:
> 4 secs, 635 ms
>
> --- ldc:
> 6 secs, 271 ms
>
> --- gdc:
> 10 secs, 439 ms
>
> I also pushed the new bash scripts to the git repository.

Flag suggestions:

ldc2 -O3 -release -mcpu=native -singleobj

gdc -O3 -frelease -march=native
December 22, 2014
On Monday, 22 December 2014 at 17:28:12 UTC, Iov Gherman wrote:
> So, I did some more testing with the one processing in paralel:
>
> --- dmd:
> 4 secs, 977 ms
>
> --- dmd with flags: -O -release -inline -noboundscheck:
> 4 secs, 635 ms
>
> --- ldc:
> 6 secs, 271 ms
>
> --- gdc:
> 10 secs, 439 ms
>
> I also pushed the new bash scripts to the git repository.

import std.math, std.stdio, std.datetime;

--> try replacing "std.math" with "core.stdc.math".
December 22, 2014
On Monday, 22 December 2014 at 18:00:18 UTC, aldanor wrote:
> On Monday, 22 December 2014 at 17:28:12 UTC, Iov Gherman wrote:
>> So, I did some more testing with the one processing in paralel:
>>
>> --- dmd:
>> 4 secs, 977 ms
>>
>> --- dmd with flags: -O -release -inline -noboundscheck:
>> 4 secs, 635 ms
>>
>> --- ldc:
>> 6 secs, 271 ms
>>
>> --- gdc:
>> 10 secs, 439 ms
>>
>> I also pushed the new bash scripts to the git repository.
>
> import std.math, std.stdio, std.datetime;
>
> --> try replacing "std.math" with "core.stdc.math".

Tried it, it is worst:
6 secs, 78 ms while the initial one was 4 secs, 977 ms and sometimes even better.

December 22, 2014
On Monday, 22 December 2014 at 17:50:20 UTC, John Colvin wrote:
> On Monday, 22 December 2014 at 17:28:12 UTC, Iov Gherman wrote:
>> So, I did some more testing with the one processing in paralel:
>>
>> --- dmd:
>> 4 secs, 977 ms
>>
>> --- dmd with flags: -O -release -inline -noboundscheck:
>> 4 secs, 635 ms
>>
>> --- ldc:
>> 6 secs, 271 ms
>>
>> --- gdc:
>> 10 secs, 439 ms
>>
>> I also pushed the new bash scripts to the git repository.
>
> Flag suggestions:
>
> ldc2 -O3 -release -mcpu=native -singleobj
>
> gdc -O3 -frelease -march=native

Tried it, here are the results:

--- ldc:
6 secs, 271 ms

--- ldc -O3 -release -mcpu=native -singleobj:
5 secs, 686 ms

--- gdc:
10 secs, 439 ms

--- gdc -O3 -frelease -march=native:
9 secs, 180 ms

December 22, 2014
On Monday, 22 December 2014 at 18:23:29 UTC, Iov Gherman wrote:
> On Monday, 22 December 2014 at 18:00:18 UTC, aldanor wrote:
>> On Monday, 22 December 2014 at 17:28:12 UTC, Iov Gherman wrote:
>>> So, I did some more testing with the one processing in paralel:
>>>
>>> --- dmd:
>>> 4 secs, 977 ms
>>>
>>> --- dmd with flags: -O -release -inline -noboundscheck:
>>> 4 secs, 635 ms
>>>
>>> --- ldc:
>>> 6 secs, 271 ms
>>>
>>> --- gdc:
>>> 10 secs, 439 ms
>>>
>>> I also pushed the new bash scripts to the git repository.
>>
>> import std.math, std.stdio, std.datetime;
>>
>> --> try replacing "std.math" with "core.stdc.math".
>
> Tried it, it is worst:
> 6 secs, 78 ms while the initial one was 4 secs, 977 ms and sometimes even better.

Strange... for me, core.stdc.math.log is about twice as fast as std.math.log.
December 22, 2014
On Monday, 22 December 2014 at 18:27:48 UTC, Iov Gherman wrote:
> On Monday, 22 December 2014 at 17:50:20 UTC, John Colvin wrote:
>> On Monday, 22 December 2014 at 17:28:12 UTC, Iov Gherman wrote:
>>> So, I did some more testing with the one processing in paralel:
>>>
>>> --- dmd:
>>> 4 secs, 977 ms
>>>
>>> --- dmd with flags: -O -release -inline -noboundscheck:
>>> 4 secs, 635 ms
>>>
>>> --- ldc:
>>> 6 secs, 271 ms
>>>
>>> --- gdc:
>>> 10 secs, 439 ms
>>>
>>> I also pushed the new bash scripts to the git repository.
>>
>> Flag suggestions:
>>
>> ldc2 -O3 -release -mcpu=native -singleobj
>>
>> gdc -O3 -frelease -march=native
>
> Tried it, here are the results:
>
> --- ldc:
> 6 secs, 271 ms
>
> --- ldc -O3 -release -mcpu=native -singleobj:
> 5 secs, 686 ms
>
> --- gdc:
> 10 secs, 439 ms
>
> --- gdc -O3 -frelease -march=native:
> 9 secs, 180 ms

That's very different to my results.

I see no important difference between ldc and dmd when using std.math, but when using core.stdc.math ldc halves its time where dmd only manages to get to ~80%
December 23, 2014
>
> That's very different to my results.
>
> I see no important difference between ldc and dmd when using std.math, but when using core.stdc.math ldc halves its time where dmd only manages to get to ~80%

What CPU do you have? On my Intel Core i3 I have similar experience as Iov Gherman, but on my Amd FX4200 I have same results as you. Seems std.math.log is not good for my AMD CPU :)

December 23, 2014
On Tuesday, 23 December 2014 at 07:26:27 UTC, Daniel Kozak wrote:
>>
>> That's very different to my results.
>>
>> I see no important difference between ldc and dmd when using std.math, but when using core.stdc.math ldc halves its time where dmd only manages to get to ~80%
>
> What CPU do you have? On my Intel Core i3 I have similar experience as Iov Gherman, but on my Amd FX4200 I have same results as you. Seems std.math.log is not good for my AMD CPU :)

Intel Core i5-4278U