improve performance for Array pack