Loop Performance Tip: Precalculate Length