One of the historically more popular optimizations is loop unrolling. Instead of a for or while loop, just “unroll” the loop: Try the test on jsPerf yourself. Note that due to the lack of a goto statement, loop unrolling has a bit of a limited appeal in JavaScript, but it’s still a useful technique in … Continue reading Loop unrolling in JavaScript
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed