12 Apr
2016
12 Apr
'16
10:21 p.m.
On 04/12/2016 02:53 PM, Guido van Rossum wrote:
The problem with your version is that copying the input is slow if it is large.
Raymond was referencing the top answer here: http://stackoverflow.com/questions/2394246/algorithm-to-select-a-single-rand.... It's also slow though (draws N random values if the input is of length N).
So the objection is that because performance can vary widely it is better for users to select their own algorithm rather than rely on a one-size-fits-all stdlib solution? -- ~Ethan~