Re: filling big array of double



> In my program I have to fill many big buffers with the same value,
> I found this great function in grids.pas:
>
> procedure FillDword(var Dest; Count: integer; Value: Integer);
> register; asm
> XCHG EDX, ECX
> PUSH EDI
> MOV EDI, EAX
> MOV EAX, EDX
> REP STOSD
> POP EDI
> end;
>
> unfortunally I'm not able to do the same thing with an array of
> "double". Any help would be greatly appreciated.

ISTM it's *very* relevant here is the array is 8-byte aligned or not.
Have you made sure that, when testing, each function got both
possibilities?

Functions that moved 8-byte blocks at once (like the FP implementation
and possible MMX solutions) should definately take this into account
and make sure no unaligned data is written.
.



Relevant Pages