Dennis Lee Bieber wrote: > On Sat, 01 May 2010 13:48:02 +0200, News123 <news1...@free.fr> declaimed > the following in gmane.comp.python.general: > >> Dennis Lee Bieber wrote: >>> That lets you do a binary search on the file. Much faster than a >>> linear search (linear search will average out to 41.5M read operations; >>> binary should be around 10000 reads) >> Don't you meant 27 reads instead of 41.5 M reads? >> > Don't you mean my 10000 reads? The 41.5M is the average for the > linear search. > Indeed, this is what I meant. or phrased differently: "about 27 reads with a binary search instead of 41.5M reads average with a linear search."
>>>>> from math import log >>>>> log(83e6)/log(2) >> 26.306608000671101 > Probably -- it was late at night and I was working things out in my > head... I know about late nights. I just wondered whether I overlooked something. -- http://mail.python.org/mailman/listinfo/python-list