This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ciphergoth
Recipients ciphergoth
Date 2018-10-28.19:00:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za>
In-reply-to
Content
random.sample currently uses either a Fisher-Yates shuffle, or rejection sampling, to achieve sampling without replacement. I propose using reservoir sampling or "cardchoose"; these are similar performance or sometimes faster, and don't need to allocate anything except the list used for the results.
History
Date User Action Args
2018-10-28 19:00:35ciphergothsetrecipients: + ciphergoth
2018-10-28 19:00:35ciphergothsetmessageid: <1540753235.51.0.788709270274.issue35094@psf.upfronthosting.co.za>
2018-10-28 19:00:35ciphergothlinkissue35094 messages
2018-10-28 19:00:35ciphergothcreate