Playing SIMD

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 26 04:22:01 PDT 2015


On Monday, 26 October 2015 at 11:10:31 UTC, Iakh wrote:
> On Monday, 26 October 2015 at 09:49:00 UTC, Iakh wrote:
>> On Monday, 26 October 2015 at 00:00:45 UTC, anonymous wrote:
>>> runBinary calls naiveIndexOf. You're not testing 
>>> binaryIndexOf.
>>
>> You are right.
>> This is fixed example:
>> http://dpaste.dzfl.pl/f7a54b789a21
>>
>> and results at dpaste.dzfl.pl:
>> -----
>> SIMD:   TickDuration(151000)
>> Binary: TickDuration(255000)
>> Naive:  TickDuration(459000)
>>
>> So SIMD version ~1.68 faster than binary
>
> At home with defult dub config "dub run --build=release":
> -----
> SIMD:    TickDuration(350644)
> Binary:  TickDuration(434014)
> Naive:   TickDuration(657548)
>
>
> ~1.24 times faster than binary and
> ~1.87 times faster than naive

It's good to see work like this. Have you tried with gdc/ldc 
(-march=native / -mcpu=native respectively if you want to use the 
full available instruction set)?


More information about the Digitalmars-d mailing list