perf: don't reuse the same incompatibility repeatedly#88
Conversation
|
There are more complicated structures that can support backtracking or filter out items faster than a |
2cccf26 to
285aba7
Compare
|
@mpizenberg Yes, No, or after |
|
@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. |
285aba7 to
0eef073
Compare
|
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
<#88 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAWFOCMUCGV4UGQCVBY35JTTOW74LANCNFSM44DHLUFA>
.
|
1aa9ee2 to
27f272e
Compare
27f272e to
e6a0fa5
Compare
mpizenberg
left a comment
There was a problem hiding this comment.
I renamed used_incompatibilities into contradicted_incompatibilities and added a few comments here and there. Let me know if that's ok.
Otherwise, all seems good to me!
|
That is fabulous, thank you! |
|
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
<#88 (comment)>,
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
relationfor an incompatibility (likeAdepends onB) is called at least twice, once whenAgets added and whenBgets added. After the first call we getAlmostSatisfiedand change thepartial_solutionso that it will be contradicted the next time. This adds a HashSet to keep track of all theIncompIds we know will stay contradicted until the next backtrack.IncompIdare just a small integer so hash very quickly.It is possible to figure out witch
IncompIds are still used after a backtrack, but so far nothing that is pulls its weight.