-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using all_distinct/1 instead of all_different/1 #25
Comments
@triska Thansk for the advice, I'll change that. What use does |
|
@triska I have reverted (maybe temporarily) back to
Whereas:
Note that this is almost certainly a bug, because if I don't constrain
And if we put the
(This was found because of this) |
Please try the latest git version. Thank you for reporting this case. |
The constraint
all_distinct/1
is typically preferable:When
all_distinct/1
is slower thanall_different/1
, it is typically acceptably slower.On the other hand, when
all_different/1
leads to slower programs than usingall_distinct/1
, the programs are typically unacceptably slower because the constraint propagation is simply too weak withall_different/1
.A few benchmarks involving common constraint problems could help to make the right decision. Overall, I recommend
all_distinct/1
for the reasons above.The text was updated successfully, but these errors were encountered: