TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: MIKE WALKER
from: HERMAN SCHONFELD
date: 1997-04-05 20:52:00
subject: Video

MW>Herman Schonfeld wrote in a message to Darin McBride:
 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 */
DM>Are you SURE that two shift operations followed by an addition is
MW>really
DM>faster than the hardware-optimized integer multiplication?
DM>Perhaps on an 8086... but on an 80486?  Probably not...
 HS> Bit shifting will ALWAYS be faster than multiplying.
MW>According to a book I am reading right now. Bit shifting is faster by a
MW>factor of around 3 times. You just have to be careful if you shift too
MW>far you may lose significant bits. :-(
My point exactly, you should forward this message to the Chris Downs.
MW>   Mike....
... Backing up drive C: ... ... ...
--- Ezycom V1.48g0 01fd016b
---------------
* Origin: Fox's Lair BBS Bris Aus +61-7-38033908 V34+ Node 2 (3:640/238)

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™.