www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/17/12:07:02

To: djgpp AT delorie DOT com
Subject: Re: Allegro lines vs. pixels
Message-ID: <19970217.084728.9983.2.chambersb@juno.com>
References: <330792EC DOT 7443 AT byu DOT edu>
From: chambersb AT juno DOT com (Benjamin D Chambers)
Date: Mon, 17 Feb 1997 11:45:28 EST

On Sun, 16 Feb 1997 16:06:20 -0700 Christian Bird <cbird AT byu DOT edu> writes:
>I've got a question for some of those allegro guru's out there.  I'm
>writing a program right now that uses lines of length 2 to 4 pixels
>long.  I'm using 640x480x256 grphics mode and I'm wondering if it's
>faster to do a vline or 2 inline _putpixel's.  I would think that 
>doing
>the putpixels would be faster, but I'm not sure.  At some point they 
>one
>becomes faster than the other. Does anyone know which is faster for
>certain length lines? Any help would be greatly appreciated.  Thanks a
>lot!

If the maximum length is 4 pixels, just hard-code four separate versions
of the routine.  This would be fastest.

...Chambers

- Raw text -


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