View Single Post
Old Jun 1st, 2006, 4:29 AM   #3
Adak
Hobby Coder
 
Join Date: May 2006
Posts: 58
Rep Power: 0 Adak is an unknown quantity at this point
The FIRST thing to remember in programming, is it's not an ultimate sprint. There will always be faster cpu's, etc., to move your program along. Speed HAS to take a back seat.

Your looking for:

*Accuracy,
*Clarity of the code,
*well-chosen algorithms,
*good interface for the end user's,

Then, speed!

If you're coding up something to intercept a speeding missile in mid-air, then speed gets moved up, considerably, but in general, the above characteristics of a good program, hold up well.

Your first choice code example is better for speed. If statements can cause a lot more work because of the way they're handled in the cache memory.

Adak
Adak is offline   Reply With Quote