Simple Code Optimizations

I echo the sentiments of my fellow programmers on optimization. You can try optimizing at random -- picking a section of code, optimizing it, and then trying it out to see if it makes a difference. But, without measuring where the bottleneck is occurring, odds are your effort will be wasted.

Let's say that you find a section of code that is very inefficient. You optimize it and it runs 100 times faster than before. However, if that section of code only represents 1% of the cpu usage, you won't notice the difference.

-Mike