Caching the array length in a local variable can be done here too.