delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/01/10:53:59

Date: Wed, 1 Mar 2000 12:02:49 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Kalum Somaratna aka Grendel <kalum AT crosswinds DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Fastest bitblt?
In-Reply-To: <Pine.LNX.4.10.10002292032040.1347-100000@darkstar.grendel.net>
Message-ID: <Pine.SUN.3.91.1000301120225.12637D-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019