From: Gregory Huczynski (greg@dcs.gla.ac.uk)
Date: Tue 07 Aug 2001 - 12:38:08 IDT
Hi,
Trying to get the maximum speed out of svgalib, I implemented double buffering
in video memory. Unfortunately, this version is actually slower than my
original one!
First version: write to a memory frame buffer in main memory and, on a screen
update, copy the buffer to video memory using a fast assembler memcpy. Speed
is ~30fps.
Second version: have two frame buffers in video memory. Write to one of the
frame buffers and, on a frame update, set the display pointer to the written
buffer using vga_setdisplaystart. On the next frame, make updates to the other
buffer, and then change the pointer again. Speed is ~21fps.
On a theoretical level, I thought that the second version would be faster, as
I'm writing directly to video memory and only change one pointer to update a
frame; in contrast, in the first version, I have to do a memory copy to update
a frame. Any ideas why double buffering in video memory is actually slower?
Thanks in advance
Gregory Huczynski
------------------------------------------------------------------
Unsubscribe: To: listbot@svgalib.org
Body: unsubscribe linux-svgalib
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST