[PATCH] Use a more efficient algorithm for list shuffling