Quote Originally Posted by dlorde View Post
a. Smaller how? fewer lines of code? fewer statements?

d. The first question to ask about spending time on performance optimization is "Is it necessary?". If you don't have clear evidence of a performance problem, why waste your time and risk introducing bugs? If you do have clear evidence of a performance problem, you must establish what is causing it, and tackle that specific area. For this you should use a performance profiler that will time how long various methods take and indicate where the bottlenecks are. In general, going in 'blind' to try and optimize code is unlikely to have any significant benefit (unless you are particularly well experienced in that area).

Premature optimization is the root of all evil in programming...
C.A.R. Hoare
Smaller as in fewer statements.

Regarding optimization, I'd simply like to ask our forumers here about the code, if it has redundancies or dead code. Thus, by removing that bloat, I believe we can arrive at an elegant and simple solution.