Search engine optimization (SEO) Question:
Does precompilation of loop limits in Web programming languages like ColdFusion, Java, and JavaScript help?
Answer:
Yes, this is also called coding motion out of loops, and is one of Bentley's 27 rules for code tuning. Also, using local variables is much faster. Many of these refactorings are covered in Chapter 10, "Optimizing JavaScript for Execution Speed."