Mail Archives: djgpp/1998/02/25/16:46:34
spragg AT catbert DOT ucdavis DOT edu said:
> Paul 'Ozymandias' Harman (ozzy AT kasterborus DOT demon DOT co DOT uk) wrote:
> : The switch() statement is INFINITELY clearer and easier to understand. It's
> : just slower.
>
> After doing some profiling on my game, I was completely surprised at the
> results. Something like 80% or the time was spent drawing to the screen.
> And I was doing some pretty on-trivial vector math to keep a plane aloft.
>
> My point is: In cases such as this, code for readability and simplicity,
> not for speed. The speed issue will (most likely) be trivial...
Uh ... I think your conclusion requires an understanding of how you were
"drawing to the screen". If putpixel() is your favorite screen drawing
function call, I don't think your conclusion is warranted.
--
Paul Hsieh
email,finger: qed AT pobox DOT com
URL: http://www.pobox.com/~qed
- Raw text -