[MERGE] (robertc) Improve index bisection lookup performance looking for keys in the parsed dict before doing bisection searches in the parsed ranges. (Robert Collins).

Robert Collins robertc at robertcollins.net
Thu Oct 18 03:48:31 BST 2007


On Wed, 2007-10-17 at 21:36 -0500, John Arbash Meinel wrote:
> 
> (I guess it just looks like you moved some checks earlier, and were
> able to
> remove an if clause.)

Yah, basically - psuedo code:

>> if foo in a_dict
is faster than
>> index = bisect(a_list, foo)
>> if foo > a_list[index] and foo < a_list[index + 1]

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071018/bf51880f/attachment.pgp 


More information about the bazaar mailing list