Author rhettinger
Recipients jab, rhettinger
Date 2009-07-31.18:28:12
SpamBayes Score 2.28628e-05
Marked as misclassified No
Message-id <>
I prefer the docs the way they are.  They help the reader understand the
relationship between min, max, nsmallest, nlargest, and sorted.

I'm not sure where you got the n * 10 <= len(iterable) switch-over
point.  That is arbitrary.  The correct switchover point depends on the
cost of the comparison function, whether the length of the input is
known, whether the input data is partially ordered, memory constraints,
whether a key function is used, and on other factors.   

FWIW, I also wrote the logic for random.sample().  The switchover logic
was straight-forward because performance depended on factors that were
fully known (length of input, sample size, memory utilization, and
average number of probes for each strategy).
Date User Action Args
2009-07-31 18:28:22rhettingersetrecipients: + rhettinger, jab
2009-07-31 18:28:14rhettingersetmessageid: <>
2009-07-31 18:28:13rhettingerlinkissue6614 messages
2009-07-31 18:28:13rhettingercreate