Skip to content
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

ADDED: ord_difference/4, ord_partition/5 #878

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmchurch
Copy link
Contributor

These operations (split diff, diff+intersection) felt like they were
missing in the ordsets library. ord_partition/5, in particular, is a
generalization of a number of different ordsets predicates; if it were
not for the fact that it potentially uses more memory than simpler
predicates like ord_intersection/3, I'd suggest that the others get
rewritten to use ord_partition/5 as a foundation.

It also brings a potential VM optimization to light: being able to
propagate the "don't-care"-ness of a _ argument into the called
predicate could allow a complex, multi-modal predicate like this
to be used without penalty.

These operations (split diff, diff+intersection) felt like they were
missing in the ordsets library. ord_partition/5, in particular, is a
generalization of a number of different ordsets predicates; if it were
not for the fact that it potentially uses more memory than simpler
predicates like ord_intersection/3, I'd suggest that the others get
rewritten to use ord_partition/5 as a foundation.

It also brings a potential VM optimization to light: being able to
propagate the "don't-care"-ness of a `_` argument into the called
predicate could allow a complex, multi-modal predicate like this
to be used without penalty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant