SIMD-specialized overloads of Phobos algorithms

Per Nordlöw per.nordlow at gmail.com
Fri Jun 28 15:49:34 UTC 2019


According to

http://0x80.pl/notesen/2018-10-03-simd-index-of-min.html

SIMD-tuning a Phobos function, such as,

     std.algorithm.searching.minIndex

for an `int[]`-haystack on AVX512f leads to a speedup of 15x.

Should such specializations be added to Phobos or is such an 
optimization only possible for LDC or GCC but not for DMD?

Further, when will compilers, such as LDC and GDC, be able to do 
these auto-vectorizations automatically? Will the GCC and Clang 
compiler setting of `-march=native` play a role also for LDC in 
the future. Currently (in LDC 1.16.0) the setting `-march=native` 
is not allowed.


More information about the Digitalmars-d mailing list