delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/01/23:16:54

Date: Wed, 1 Mar 2000 20:34:47 +0600 (LKT)
From: Kalum Somaratna aka Grendel <kalum AT crosswinds DOT net>
X-Sender: root AT darkstar DOT grendel DOT net
To: djgpp AT delorie DOT com
Subject: Re: Fastest bitblt?
In-Reply-To: <fk6pbssnsuuhcoai79al4bvu6kk1ns9k7s@4ax.com>
Message-ID: <Pine.LNX.4.10.10003012019380.1919-100000@darkstar.grendel.net>
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 Wed, 1 Mar 2000, Damian Yerrick wrote:

> On Tue, 29 Feb 2000 21:09:10 +0600 (LKT), Kalum Somaratna aka Grendel
> <kalum AT crosswinds DOT net> wrote:

> Now what is the Matrix again? :-)
> 
> >> How is movedata() difficult?
> >
> >Not difficult but slow...
> 
> How is rep movsd slow?

It is not the rep movsd per se that is slow. But the setting up of the rep
movsd (the seg regs etc..all those pushes and pops for the stack, so many
arguments). If you have a time critial rountine I don't whink that
movedata would be a good bet.


> >Just imagine the overhead of setting up the stack 100 times etc during the
> >100 calls to movedata in a interrupt handler :-)
> 
> So inline your movedata:  set up the seg regs and then rep movsd
> Isn't this what Allegro does?

I think you may have misunderstood me here. Say there is a interrupt
handler which is called 100 times per sec. And say that there is only one
call to movedata in the interrupt handler. That would mean that a total of
100 calls to move data per sec. so imagine the overhead of setting up even
the segregs repetetively. 

Since it is in the interest of getting a interrupt handler to finish
execution as soon as possible I think that incorporating the movedata in
to a time critical interrupt routine will result in unnecessary waste of
the cpu. IMHO farpoke* would be a better alternative but nearptrs would
result in the least number of insn and the fastest code. I know that using
farptrs doesn't involve much of a slowdown but surely no one can say that
nearptrs are slower than farptrs.

Anyway since ID was instrumental in adding nearptrs to DJGPP I'm a bit
curious as to why the required it. Was it because it made porting Watcom
code easier or something else like easy (char *p) acesssto <1mb memory?

Would there be anyone who can enlighten us on this matter?

> Of course, if you want to do byte by byte (more realistic in sound
> code that mixes samples), farpokeb() is best.

IMHO nearptr's would be the least troublesome and easier to code.
especially if you are used to the dosbuffer[1]=0x80; etc syntax rather
than the farpokeb(...) etc
 
Grendel


> This is McAfee VirusScan. Add these two lines to your .sig to
> prevent the spread of .sig viruses.  http://www.mcafee.com/
^^^^^^^^^^^^^^^
Virus -: How much longer do I have to bear to look at this miserable
excuse for a virus scanner ;-) It's nothing serious just a mere annoyance
thats all...

Hi, I'm a signature virus. plz set me as your signature and help me spread
:)

- Raw text -


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