Re: filling big array of double



Aleksandr Sharahov wrote:
One more ;-)

procedure FillDouble(var Dest; Count: integer; Value: double); register;
asm
   neg   edx
   jge   @ret
   shl   edx, 3
   sub   eax, edx
   movq  mm0, [ebp+8]
   test  edx, 8
   jz    @loop
   movq  [eax+edx], mm0
   add   edx, 8
   jge   @ret
@loop:
   movq  [eax+edx], mm0
   movq  [eax+edx+8], mm0
   add   edx, 16
   jl    @loop
@ret:
   emms
   end;



It is also 2 time slower, but it is beautifull ;)

Henri
.



Relevant Pages