Ready for review: new std.uni

Mehrdad wfunction at hotmail.com
Thu Jan 17 01:20:17 PST 2013


On Monday, 14 January 2013 at 07:21:57 UTC, Walter Bright wrote:
> I've done some research on auto-vectorization, i.e. "The 
> Software Vectorization Handbook" by Bik.
>
> My conclusion (Manu independently came to the same one, he's 
> our resident SIMD expert) is that auto-vectorization is a 
> disaster.
>
> What it is is:
>
> 1. Reverse engineer a loop into a higher level construct
> 2. Recompile that construct using vector instructions
>
> It's a disaster because (2) often fails in ways that are 
> utterly mysterious to 99% of programmers. The failure mode is 
> to not auto-vectorize the loop. Hence, the failure is silent 
> and the user just sees poor performance, if he notices it at 
> all.



Have you seen the Visual C++ 2012 compiler? It fixes that problem.

Its auto-vectorizer has two switches:

1. /Qvec-report:1, which reports the auto-vectorized loops
2. /Qvec-report:2, which reports all potential candidates and 
whether or not they were vectorized (and if not, a reason code)




More information about the Digitalmars-d mailing list