Mail Archives: djgpp/1996/06/06/06:04:16
>> and VESA 2 linear frame buffers. If I were to use near pointers would
>> it make it any faster?
>I think not. I got about a 5% speedup of my putpixel() function from
>using near pointers, and that is the absolute worst case becuase it
>involves a segment load per pixel. If you are just setting the selector
>once for any more significant drawing tasks, the overhead is so small
as
>to be totally insignificant.
I would agree totally, using near pointers is not worth it. Remember,
GCC
doesn't touch %fs and %gs, so just put your selector there, and you only
load it once. Just watch out for the _far* family, as they will clobber
%fs
(though you'd probably be using them for the same selector anyway!).
A final note: Using far pointers, at best, still costs 1 cycle per pixel
over
near pointers, for the seg override, and may screw up P5 pairing, as the
seg override will not pair, and counts as an instruction (sort of).
Still, this
could be 1/100 of a second per frame... I think.
----
moskewicz AT mem DOT po DOT com
- Raw text -