[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inline asm?



> Hmm...is optimization over-rated then? Most of the graphics literature
> I've been reading talks about using bitshifts instead of multiplies for
> pixel placement, etc, and shows how much faster these things are. Would
> it be safe to assume that the way the library does it is "good enough"?

1) Code the desired results.
2) Analize where the code is too slow before optimizing.
3) Optimize.

In my current program I haven't gotten around to inlining the simple
C++ functions because for my machine it doesn't matter.  (In fact my
machine can run the DOS port at full speed even though it makes 2 extra
copies of the entire screen when ever drawing.  The machine is 150Mhz
and the game is running in 320x200x256.)

Remember
  2) Analize where the code is too slow before optimizing.
It sucks to optimize the wrong function.  I know.

Dennis Payne
dulsi@identicalsoftware.com