[fpc-devel] using sse2 packed doubles

Florian Klaempfl florian at freepascal.org
Sat Oct 7 23:45:34 CEST 2006


Vincent Snijders schrieb:
> Daniƫl Mantione wrote:
>>
>> Op Fri, 6 Oct 2006, schreef Micha Nelissen:
>>
>>
>>> Vincent Snijders wrote:
>>>
>> You could also start an assembler implementation of the matrix unit. I 
>> suppose using it is allowed, and a Tvector2_double looks a lot like 
>> such a double2.
> 
> Unless the compiler somehow helps, inlining the assembler implementation 
> won't work and then the speedup might be lost again.

I started to add vector pascal like support, currently only i386/x86_64 
are supported (no generic support). The whole (currently implemented) 
functionality is demonstrated by the following example. Please give some 
feedback if it allows benchmark speedups.

var
   ad1,ad2,ad3 : array[0..1] of double;
   as1,as2,as3 : array[0..3] of single;

begin
   ad1:=ad2/ad3;
   ad1:=ad2+ad3;
   ad1:=ad2*ad3;
   ad1:=ad2-ad3;
   as1:=as2/as3;
   as1:=as2+as3;
   as1:=as2*as3;
   as1:=as2-as3;
end.

You need to use the experimental switch -Sv.



More information about the fpc-devel mailing list