Mail Archives: djgpp/1996/02/05/02:02:22
On Sun, 4 Feb 1996, Niklas Lundberg wrote:
> what's the difference between farpoke / farpeek and direct access like
> video[0] = 15; ???
A direct access is a bit faster when you need to loop through the
individual pixels (you can use _farnspeek/_farnspoke functions to speed
up the farptr method, but it's still a bit slower than the direct
access). The nearptr direct access is more dangerous, because it
effectively disables memory protection.
If you just move a buffer from or to the screen, use movedata() instead,
which should be faster than both of the above methods.
- Raw text -