www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/03/03:39:35

From: Damian Yerrick <DONT DOT YOU DOT DAREd_yerrick AT hotmail DOT comSEND DOT SPAM>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Fastest bitblt?
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <fqfubsc9f6pcgd2vjt2adj7l3eaokf6b0a@4ax.com>
References: <fk6pbssnsuuhcoai79al4bvu6kk1ns9k7s AT 4ax DOT com> <Pine DOT LNX DOT 4 DOT 10 DOT 10003012019380 DOT 1919-100000 AT darkstar DOT grendel DOT net>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 56
X-Trace: +4QiDEHIDJERZdc189G1N66yB3PrGoOP7enTM4rbB07pFsyhQqSSsQzNPJyc8/6VqItDzYrfIi6/!47El0UNH2v9+QIkQ9FJ8N4LMmLlJhiYw942K1F1hxEQ8yiSnWt2aMiSq5dBNbA0yNQy1krO+Ny67!zyZs
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Fri, 03 Mar 2000 04:43:10 GMT
Distribution: world
Date: Fri, 03 Mar 2000 04:43:10 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Wed, 1 Mar 2000 20:34:47 +0600 (LKT), Kalum Somaratna aka Grendel
<kalum AT crosswinds DOT net> wrote:

>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 movedata
>per sec. so imagine the overhead of setting up even
>the segregs repetetively.

The rep movsd would most likely take much longer than the setup, if a
non-trivial-size buffer is being moved.  But if it's that time
critical, it'll be in assembly anyway.

>Since it is in the interest of getting a interrupt handler to
>finish execution as soon as possible I think that incorporating
>the movedata into a time critical interrupt routine will result
>in unnecessary waste of the cpu.

One word: inline.

>IMHO farpoke* would be a better alternative

And farpoke* is how you inline movedata().

>but nearptrs would result in the least number of insn
>and the fastest code.

Show us the benchmarks (farpoke*() vs. nearptr).

>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?

I'd say Watcom legacy code and coders.

>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

C++ can do operator overloading, which converts farpokel() into
an array access.

OK.  I'll give up pushing movedata().  Can anyone show me a
non-trivial example where farpoke*() is significantly slower
than a nearptr access?  S h o w   m e   t h e   s o u r c e .

-- 
Damian Yerrick  http://yerricde.tripod.com/
Comment on story ideas: http://home1.gte.net/frodo/quickjot.html
AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/
View full sig: http://www.rose-hulman.edu/~yerricde/sig.html

This is McAfee VirusScan. Add these two lines to your .sig to
prevent the spread of .sig viruses.  http://www.mcafee.com/

- Raw text -


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