You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When inspecting the configuration of a large case (20k+ constraints) the vars are often boolean bound (or at otherwise have an upper bound of about 5). We have a lot of code intended to be generic, but maybe it would pay off to handle boolean cases explicitly.
We already have "small" domains, represented as bitwise flags, this already helps considerably. We could simply compare domain === ONE and act accordingly. For example, the eq([0, 1], [1, 1]) could be handled with a table. Now this is a bad example because eq on small domains is dealt with through binary AND-ing. But the point is that not all propagators can get away with bitwise shortcuts. For them a simply solution table for booleans could make a lot of difference.
It also may not if it turns out the small domains already save most of this
Any boolean bound domain should be a number, which can be compared to constants (EMPTYZEROONEBOOL) which is much faster than what arrays used to do. Simple lookup tables can lead to O(1) solutions for propagation steps, for insofar they aren't already.
The text was updated successfully, but these errors were encountered:
When inspecting the configuration of a large case (20k+ constraints) the vars are often boolean bound (or at otherwise have an upper bound of about
5
). We have a lot of code intended to be generic, but maybe it would pay off to handle boolean cases explicitly.We already have "small" domains, represented as bitwise flags, this already helps considerably. We could simply compare
domain === ONE
and act accordingly. For example, theeq([0, 1], [1, 1])
could be handled with a table. Now this is a bad example becauseeq
on small domains is dealt with through binary AND-ing. But the point is that not all propagators can get away with bitwise shortcuts. For them a simply solution table for booleans could make a lot of difference.EMPTY
ZERO
ONE
BOOL
) which is much faster than what arrays used to do. Simple lookup tables can lead toO(1)
solutions for propagation steps, for insofar they aren't already.The text was updated successfully, but these errors were encountered: