Re: filling big array of double
- From: Henri Gourvest <x@xxxxx>
- Date: Tue, 31 May 2005 15:19:39 +0200
Aleksandr Sharahov wrote:
Hi Henri,
Untested procedure here. -- regards Aleksandr
procedure FillDouble(var Dest; Count: integer; Value: double); register; asm neg edx jge @ret shl edx, 3 sub eax, edx mov ecx, [ebp+8] mov ebp, [ebp+12] @loop: mov [eax+edx], ecx mov [eax+edx+4], ebp add edx, 8 jl @loop @ret: end;
thank you Aleksandr,
it is about 2.7% faster than this pascal code:
var
i: integer;
p: PInteger;
begin
p := @dest;
for i := 1 to count do
begin
p^ := Value;
inc(integer(p), 4);
end;
end;I've also tested the filldword method, but the borland asm code don't really give any improvement :-(
Henri .
- Follow-Ups:
- Re: filling big array of double
- From: Aleksandr Sharahov
- Re: filling big array of double
- References:
- filling big array of double
- From: Henri Gourvest
- Re: filling big array of double
- From: Aleksandr Sharahov
- filling big array of double
- Prev by Date: Re: filling big array of double
- Next by Date: Re: filling big array of double
- Previous by thread: Re: filling big array of double
- Next by thread: Re: filling big array of double
- Index(es):
Relevant Pages
|