Closed Eh2406 closed 3 years ago
There are more complicated structures that can support backtracking or filter out items faster than a HashSet.contains
, but this was a simple change with a significant perf improvement. Love to play with a bigger PR, but only after the Range Trait.
@mpizenberg Yes, No, or after 0.2.1
? Thoughts?
@Eh2406 sorry haven't had time to check this out. Seems like a good idea but I'll have to wait until the weekend I think to review
No rush! Thank you for the thorough reviews. Just wanted to make shore it was still on your radar.
I am feeling the urge to try some of the more complicated options. Will you have time to take a look at this before I succumb?
Indeed, I should have time this afternoon
On Fri, May 21, 2021, 04:24 Jacob Finkelman @.***> wrote:
I am feeling the urge to try some of the more complicated options. Will you have time to take a look at this before I succumb?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pubgrub-rs/pubgrub/pull/88#issuecomment-845604890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWFOCMUCGV4UGQCVBY35JTTOW74LANCNFSM44DHLUFA .
That is fabulous, thank you! Do you think the rename should trigger a new 10 day open time or can we merge now?
Nah I think nobody else is gonna complain if you merge this ^^
On Sat, May 22, 2021, 02:12 Jacob Finkelman @.***> wrote:
That is fabulous, thank you! Do you think the rename should trigger a new 10 day open time or can we merge now?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pubgrub-rs/pubgrub/pull/88#issuecomment-846317382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWFOCOTZXJUXXLYX37SC33TO3ZITANCNFSM44DHLUFA .
This includes #87, the only new part is the last commit. It is intended to be merged after it.
Most of the time
relation
for an incompatibility (likeA
depends onB
) is called at least twice, once whenA
gets added and whenB
gets added. After the first call we getAlmostSatisfied
and change thepartial_solution
so that it will be contradicted the next time. This adds a HashSet to keep track of all theIncompId
s we know will stay contradicted until the next backtrack.IncompId
are just a small integer so hash very quickly.It is possible to figure out witch
IncompId
s are still used after a backtrack, but so far nothing that is pulls its weight.