Boost logo

Boost-Build :

From: David Abrahams (gclbb-jamboost_at_[hidden])
Date: 2003-06-18 08:48:37


Vladimir Prus <ghost_at_[hidden]> writes:

> David Abrahams wrote:
>
>> >> > So, property-set.create would do something smarter than just sorting
>> >> > all properties. But it would have to sort some properties --- else
>> >> > much more property-set instance will be created.
>> >>
>> >> I don't see why. It's easy to detect that two Jam lists have equal
>> >> contents without ever sorting anything. Reasonably quickly, too.
>> >
>> > Suppose you end up with two property sets. One contains
>> >
>> > <define>FOO <define>BAR
>> >
>> > and the other contains
>> >
>> > <define>BAR <define>FOO
>> >
>> > Semantically, they are the same. If you've processed the first set, you
>> > can cache the results and do nothing about the second. If you compare
>> > them as strings: well, they are different.
>>
>> Yes. To check for set equality you do:
>>
>> if $(a) in $(b) && $(b) in $(a) ...
>
> But.... say you have several already-created property-sets. With sorting, to
> see if property-set for a certain raw property list exists, you sort the
> list, join all elements and use the result as a key in a cache. With the
> comparison you propose, you'd have to iterate over all existing
> property-sets.

...Or something like that.

> And now sure that's such a performance issue, though.
^^^^^^^^^^^^
"I'm not sure"?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk