On Sat, 24 Apr 2010 10:37:15 am Steven D'Aprano wrote: > For the record, here's some timing benchmarks to see how badly it > turned out: [...] > 0.0346097946167 > 0.461233854294 > 3.04955101013 > 5.70547604561 > > For comparison, here's the timing on a plain binary search:
Oops, I hit send too soon and forgot the timing. Here it is: 0.0034401416778564453 So about 10 times faster than a linear search on 10,000 items. Not to be sneezed at, but unless the time taken by your program is dominated by the searches, I probably wouldn't bother with the extra complexity. -- Steven D'Aprano _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor