On 03/23/2015 10:17 PM, Dave Angel wrote:
On 03/23/2015 09:42 PM, boB Stepp wrote:
Not really. See Steve's
OOPS. Peter's > response for some numbers. If I had to guess,
I'd say that for lists over 100 items, you should use bisect or equivalent. But I'd also say you should have one algorithm in your final code, even if it's sub-optimal for tiny lists. If even a fraction of the searches are going to be on a list of 10k items, you should switch to a bisect approach.
-- DaveA _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor