Mail Archives: djgpp/1998/10/21/18:01:37
On Mon, 19 Oct 1998, Ludvig Larsson wrote:
> Just a question.
>
> My clear-buffer routine is so slow.
>
> I want to fill about 600.000 bytes in onepart of the memory
> with a constant(not screen).
> On my AmdK6-2 300mhz it takes 0.006 sec. which gives about
> 100millions of bytes/sec. Quite a bit right!
> But should it take 3 clockcykles to clear each byte?
> I'm clearing quadwords...
>
> I'm using asm(rep stosl).
>
> Is this normal? Is it a sort of cache thing?(my amd has 64kb on-chip,
> 512 kb burst and the rest is 100mhz memory).
If you have 10ns memory (burst write times) then your maximum
fill rate cannot exceed 0.002 sec for a 153,600 dword aligned buffer,
assuming the memory behaves according to spec. On an aligned dword buffer,
using rep stosl, your times are probably the fastest the machine can
produce.
Cheers,
Elliott Oti
http://www.fys.ruu.nl/~oti
Eh? Where's my sig?
- Raw text -