A look at Chapel, D, and Julia using kernel matrix calculations

data pulverizer data.pulverizer at gmail.com
Sun May 24 07:29:52 UTC 2020


On Sunday, 24 May 2020 at 05:39:30 UTC, data pulverizer wrote:
> On Friday, 22 May 2020 at 14:13:50 UTC, kinke wrote:
>> ... and secondly use -fsave-optimization-record to inspect 
>> LLVM's optimization remarks (e.g., why a loop isn't 
>> auto-vectorized etc.).
>
> By this are you saying that SIMD happens automatically with 
> `-mcpu=native` flag?
>
I've just tried it and the times are faster just adding the flag 
the times for the largest data set is very close to Julia's 
sometimes a little faster sometimes a little slower.

I have extended the number kernel functions to 9 and the full 
benchmark in Julia is taking 2 hours (I may have to re-run it 
since I made some more code changes). I've added the new kernels 
(locally) to D and updating the script now. I also need to do the 
same for Chapel. Once I run them all I'll update the article.

 From what I can see now D wins for all but the largest data set 
but with new flag it's so close to Julia's that it will be a 
"photo finish" I might have to run at the largest data size 100 
times, I'll just pick one kernel (probably dot product) for that 
but it will take AGES! I'll have to look at maybe running it on a 
cloud instance rather than locally. Populating the arrays is what 
takes the longest time, I'll probably do that using parallel 
threads. This is getting interesting!



More information about the Digitalmars-d mailing list