better-performing impl of iterator for ArrayList