delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/01/16/18:21:34

From: "Alexei A. Frounze" <dummy_addressee AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: MISSION: Making worlds fastest pixel drawing possible
Date: Tue, 16 Jan 2001 18:15:44 -0500
Lines: 50
Message-ID: <942kla$c7fav$1@ID-57378.news.dfncis.de>
References: <942h1e$5qq$1 AT tron DOT sci DOT fi>
NNTP-Posting-Host: pppa43-resalerochester3-5r7104.dialinx.net (4.4.209.232)
X-Trace: fu-berlin.de 979686892 12827999 4.4.209.232 (16 [57378])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

macro is a good thing.

though precalculated addresses for x,y pair can slow down things on decent
CPUs. On 286 and 386 this could be a good thing but not now on Pentiums.

I also see segment register reload in your code. This thing also slows down.

Btw, globalBuffer[x][y] <- is the same crap as "something + (y<<10)+(y<<8)"
because the compiler has to translate those [x][y] into an address anyway.

So your code is even worse than something like "screen[(y<<8)+(y<<6)+x] =
color".

Take care
--
Alexei A. Frounze
alexfru [AT] chat [DOT] ru
frounze [AT] ece [DOT] rochester [DOT] edu
http://alexfru.chat.ru
http://members.xoom.com/alexfru/
http://welcome.to/pmode/

"Traveler" <traveler AT netti DOT fi> wrote in message
news:942h1e$5qq$1 AT tron DOT sci DOT fi...
>
> Contents:
> - Fastest possible way to draw pixel´s (well, maybe the near pointer hack
> mentioned in DJGPP FAQ is faster :)). Drawing developed as a macro
(becourse
> jumping to function and back again takes more time than drawing the damn
> pixel !). Screen coordinates pre-calculated in the global table.
>
> Feedback needed about the following subjects:
> 1) Is it necessary to save ES segment register (the macro currently does
not
> do it, but it seems to work fine, no crashes, etc...) ?
> 2) Is the assembly command "les    %0,%%edi" faster than the currently
used
>  "movw    %0,%%es;movl %1,%%edi" pair ?
>
> "Traveler 2001AD"
> traveler AT netti DOT fi
> Dark DOT Angel AT saunalahti DOT fi
>
>
>
>
>


- Raw text -


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