View Single Post
  #14  
Old 05-31-2006, 05:58 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Things that you can store as boolean values rather than strings or integers makes things run faster (ex. use client.cx = true instead of client.cx = "on"). Using bitwise operators also makes things work faster, etc. (ex. (x|y) in range) rather than x in range && y in range.

When you can, use addition instead of multiplication
ex. do
for (i=0; i<size; i+=10)
showimg(201,image,x,y);

for (i=0; i<size; i++)
showimg(201,image,x*10,y*10);

also, when possible work in powers of two.
Reply With Quote