TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: NIELS JONKER
from: DARIN MCBRIDE
date: 1997-03-26 07:17:00
subject: Re: Video

 NJ>  //Screen[x+y*320] = color;
 NJ>  Screen[x+(y<<6)+(y<<8)] = color; /* same as above but here the
 NJ>          multiplication is replaced with
 NJ>          shifts to make it faster */
Are you SURE that two shift operations followed by an addition is really 
faster than the hardware-optimized integer multiplication?
Perhaps on an 8086... but on an 80486?  Probably not...
--- Maximus/2 3.01
---------------
* Origin: Tanktalus' Tower BBS (PVT) (1:342/708)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.