[squeak-dev] Re: includes: does linear search for SortedCollection???????

Igor Stasenko siguctua at gmail.com
Sun Dec 19 19:21:02 UTC 2010


On 19 December 2010 19:54, James Foster <Smalltalk at jgfoster.net> wrote:
>
> In GemStone we used to do a binary search on #'includes:' but a customer complained that they had a domain object where #'=' was implemented using different instance variables than #'<=' so that a linear search would find an equivalent object but a binary search would miss it. We changed #'includes:' to use a linear search and added another method, #'binarySearchIncludes:' to have the old (fast) behavior.
>

i think this is a good compromise.

> James
>
-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list