SIMD benchmark

Iain Buclaw ibuclaw at ubuntu.com
Mon Jan 16 11:16:56 PST 2012


On 16 January 2012 18:59, Walter Bright <newshound2 at digitalmars.com> wrote:
> On 1/16/2012 8:48 AM, Andrei Alexandrescu wrote:
>>
>> My point was that the version using float arrays should opportunistically
>> use
>> hardware ops whenever possible.
>
>
> Yes, you're right. The compiler can opportunistically convert a number of
> vector operations on static arrays to the SIMD instructions.
>
> Now that the basics are there, there are many, many opportunities to improve
> the code generation. Even for things like:
>
>  int i,j;
>  i *= 3;
>  foo();
>  j *= 3;
>
> the two multiplies can be combined. Also, if operations on a particular
> integer variable are a subset that is supported by SIMD, that variable could
> be enregistered in an XMM register, instead of a GP register.
>
> But don't worry, I'm not planning on working on that at the moment :-)

Leave that sort of optimisation for the backend to handle please. ;-)


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';


More information about the Digitalmars-d mailing list