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

Persistent List destruction size limit #1

Open
ghita opened this issue Oct 6, 2014 · 3 comments
Open

Persistent List destruction size limit #1

ghita opened this issue Oct 6, 2014 · 3 comments

Comments

@ghita
Copy link

ghita commented Oct 6, 2014

Hy,

The list implementation is simple/nice but it imposes a limit on number of stored elements because of "additional effect" of recursive destruction. A garbage collector would be very nice indeed, without it I don't know if using a "production persistent List" is really possible.

@BartoszMilewski
Copy link
Owner

Either garbage collection, or tail recursion optimization would fix the problem. But there are many problems in which the length of the list is bounded -- as in the eight queen problem. Also, there are alternatives to lists -- tree-like structures.

@stoeckley
Copy link

Does this issue also extend to other data structures besides lists in this library?

@BartoszMilewski
Copy link
Owner

This library should be treated as a proof of concept. I was worried more about correctness and ease of use (especially in backtracking algorithms) than about performance.

It also points out at inherent shortcomings of C++. Contrary to popular belief, C++ is not an optimal implementation language for a whole slew of very useful data structures and algorithms.

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

No branches or pull requests

3 participants