Eliminating large array scan