randomizing a list

The obvious way to randomize a list of items would be vaguely like this:

 proc bogus {a b} {return [expr int(rand()*3)-1]}
 lsort -command bogus $inputlist

where "bogus" returns "equal" or "greater than" or "less than" at random for any two inputs.

However

 lsort -command ...

is kinda slow. This works fine for a couple hundred items; for a million it becomes too cumbersome. \

Anybody have something cleverer?

AK: I believe that you are looking for Shuffle a list.

AMG: Or unsort or Shuffling a list.