This expression maybe be optimized under the new JIT but I would still assign length to a variable outside of the for loop then use the reference here.