Made packing faster for big arrays.