Mail Archives: djgpp/1998/10/22/21:12:43
Alan Bork wrote:
>
> > First of all, I'd like to know which of those takes longer to refresh?
> >
> > 800x600x15bit
> > 640x480x32bit
> >
> > Second, how do you calculate how much memory it takes?
>
> I am not sure about the refresh but the memory is easy enough.
> First note that the 15 bit will be treated as 16 bit and just
> throwing away the extra bit.
>
> 16 bit is 2 bytes
> 32 bit is 4 bytes
> (we all know that so...)
>
> 800 * 600 * 2 = 960000 bytes or 937.5 KB
> 640 * 480 * 4 = 1228800 bytes or just over 1.17 MB
I had some "strange" slowdown problems with my clear-boublebuffer
routine, and well, the boundare for clearing a this large block in
memory isn't the processor speed but the memory speed.
Ex. clearing 600.000bytes took 0,006 sec but clearing
6000 bytes 100 times(=600.000) took 0,002 sec...(because the memory was
loaded in the cache onchip and is about 3 times faster than ordinary
memory, on my machine).
so, if you have 100mhz memory, expect to be able to clear 1mb in about
0,01 sec.
hth
Ludvig Larsson
- Raw text -