A look at Chapel, D, and Julia using kernel matrix calculations
data pulverizer
data.pulverizer at gmail.com
Sun May 24 05:39:30 UTC 2020
On Friday, 22 May 2020 at 14:13:50 UTC, kinke wrote:
> On Friday, 22 May 2020 at 01:58:07 UTC, data pulverizer wrote:
>> Comments welcome.
>
> Thx for the article. - You mention the lack of multi-dim array
> support in Phobos; AFAIK, that's fully intentional, and the
> de-facto solution is
> http://docs.algorithm.dlang.io/latest/mir_ndslice.html.
I've now updated the blog with this information (the new docs
home: http://mir-algorithm.libmir.org/mir_ndslice.html).
> As you suspect SIMD potential being left on the table by LDC,
> you can firstly use -mcpu=native to enable advanced
> instructions supported by your CPU, ...
If special instructions are enabled does the compiler
automatically take advantage of these or does the programmer need
to do anything?
> ... 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?
> ... -O5 is identical to -O3, which is identical to -O.
Yes I saw that when I was writing the code and tried it and found
it to be true but there's something psychologically comforting
about using -O5 rather than -O. I've updated the article to
reflect your comments. I'm in the process of updating the D code
and will change the flags once I'm done. Thanks
More information about the Digitalmars-d
mailing list