I noticed this in your other loops as well but thought this one might make a difference. You should probably store off that length for performance, otherwise, it is calculated on every pass through the loop. Might be good to update them everywhere but I think definitely here.