> -----Original Message----- > From: tutor-bounces+bermanrl=cfl.rr....@python.org [mailto:tutor- > bounces+bermanrl=cfl.rr....@python.org] On Behalf Of Hugo Arts > Sent: Friday, April 23, 2010 5:55 PM > To: Emile van Sebille > Cc: tutor@python.org > Subject: Re: [Tutor] Binary search question > > >>>>>>>>>>>>>>>>>BIG SNIP
> Of course, profiling will immediately catch that kind of performance > bottleneck. So even if you care about performance, you can start off > using 'in' and easily optimize later with bisect or a set, the whole > "don't do it yet" thing and all. > > Hugo This sounds very much like the school of thought that equates optimal efficiency with the developers level of comfort < not confidence>. So that I might be willing to live with an occasional 7 second search time for the general ease of using <value> in list. Knowing of course that eventually a programmer who is concerned with that potential 7 second lag time will opt for either a dictionary lookup or a bisected search. Robert Berman What you don't see with your eyes, don't invent with your mouth. > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor