We get quite a nice speedup if we take loop limits outside of the loop, and make them local variables. For example:
for ( i = 0; i < 100000; i++ )
var limit = 100000;
for ( i = 0; i < limit; i++ )
We get quite a nice speedup just because the loop limit becomes an astore/aload instead of a new object creation representing the limit. On a 10 second loop, we gained about 1 second.