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

Inefficient nub #15

Open
mx-psi opened this issue Jan 7, 2015 · 1 comment
Open

Inefficient nub #15

mx-psi opened this issue Jan 7, 2015 · 1 comment
Assignees

Comments

@mx-psi
Copy link
Contributor

mx-psi commented Jan 7, 2015

Current implementation of closure uses Prelude's nub function for removing duplicates. This function is O(n^2), yet it can be improved using nub for ordered lists which is O(n).

This, however, will restrict the type of states to ordered types. Should we use the more efficient version of nub?

@mx-psi mx-psi self-assigned this Jan 7, 2015
@mx-psi
Copy link
Contributor Author

mx-psi commented Jan 8, 2015

Another option is using the Set datatype which doesn't conserve order but is also more efficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant