From: Ludvig Larsson Newsgroups: comp.os.msdos.djgpp Subject: Re: Graphic Speed and memory Date: Fri, 23 Oct 1998 03:35:24 +0200 Organization: Faas-Goldhart Lines: 34 Message-ID: <362FDD5C.2212@club-internet.fr> References: <362F1A03 DOT C49DA4C1 AT phreaker DOT net> <70nq5e$11m AT newsops DOT execpc DOT com> NNTP-Posting-Host: toulouse-camichel9-100.club-internet.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: front1.grolier.fr 909108142 25200 195.36.147.100 (23 Oct 1998 02:02:22 GMT) NNTP-Posting-Date: 23 Oct 1998 02:02:22 GMT X-Mailer: Mozilla 3.01C-CLUB (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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