Mail Archives: djgpp/2000/03/01/10:53:59
On Tue, 29 Feb 2000, Kalum Somaratna aka Grendel wrote:
> Well if you are so paranoid then enable nearptrs only before you execute
> code that depends on it like blitting routines, and disable them
> immediately afterwards.
This would actually be a very bad idea: __djgpp_nearptr_enable invokes
a costly DPMI call. Calling it too frequently will completely destroy
any hope for faster performance, which was the reason to use it in the
first place.
> Although this would cause a certain amount of performance problems due to
> the complex DPMI calls (less so with modern day machines)
DPMI calls are so expensive that you will see the effect on *any*
machine. And you won't like it, believe me ;-)
> So the nearptr usage is nothing to be frowned upon or for other
> programmers to get a heart attack about :-)
I think this nonchalance is very dangerous. A technique that makes
your programs more vulnerable to bugs and at the same time does not
bring any real speedup should be used as seldom as possible.
- Raw text -