Could we move this var out of this scope to avoid calculating the length more times than once?