#shuffling a slice
1 messages · Page 1 of 1 (latest)
std.rand.Random has a shuffle method
oops, completely missed that. thanks!
(shameless plug) Total coincidence, but I just finished writing a shuffle library. It uses the stdlib under the hood, but if you want a shuffled copy and your individual data elements are larger than 4-8 bytes you can expect it to be a fair bit faster (reduced memory bandwidth by shuffling an index array and reading from that).