Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
A 3-way comparison is the traditional "return <0, =0, or >0" protocol.
The implementation supports compile-time polymorphism to select the most
appropriate comparison, defaulting to operator<.
This yields a huge improvement in the program run-time, probably because
the program compares lots of complex objects, especially things like
imm::set objects that build their comparison from sub-comparisons.
It would still be good to overload compare3<> on the types used in the
aptitude resolver universe -- although the core types are simple enough
that the compiler will probably be able to optimize the extra
comparisons away (I hope, anyway).
|
|
contains a key.
|
|
|
|
The rest of the code still needs to be overhauled to take the changes
into account, and it looks like there are bugs in code that's only
instantiated from the client (e.g., reject_version()).
|
|
|
|
|
|
over *all* entries, not just some of them.
|
|
|
|
|
|
These were always a little weird, they turn out not to be necessary for
the purpose they were originally introduced to serve, and they play
havoc with some of the optimizations I'm working on.
They aren't necessary to generate promotions for approvals, because
only the deferred choice itself would get this special tag. Just by
the usual way promotions are generalized, the dep-scoped choice is
always eliminated before it does anything useful.
The specific problem motivating this change is that dep-scoped choices
make it much trickier to have a mapping from choices to lists of solved
dependencies using the generic choice_indexed_map object. This isn't
an insurmountable problem, but considering the other issues with
dep-scoped choices, I thought it was a good idea to get rid of them.
For instance, look at how much simpler choice_indexed_map is when it
doesn't have to support dep-scoping.
|
|
A map is a more natural fit for the semantics of the core data structure
than a set, and the set behavior can easily be layered on top. This
will be very slightly less efficient (a few extra traversals of the set
for some operations), but most of that can be recovered if it matters.
|