fastest for large input