-
Notifications
You must be signed in to change notification settings - Fork 555
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
Collection constructor is very slow with large lists #609
Labels
Milestone
Comments
it's O(n^2), but i agree that it's unnecessary... if you make a pull request, i'll accept it. |
gromgull
added a commit
that referenced
this issue
Jan 19, 2017
… items. Fixes #609 As a bonus adds a `graph.collection` convenience method for creating collections
gromgull
added a commit
that referenced
this issue
Jan 19, 2017
… items. Fixes #609 As a bonus adds a `graph.collection` convenience method for creating collections
gromgull
added a commit
that referenced
this issue
Jan 19, 2017
… items. Fixes #609 As a bonus adds a `graph.collection` convenience method for creating collections
I went for a fix without the _end caching issues. Now there is a |
This was referenced Mar 16, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The collection constructor uses the append method, which iterates to the end of the list for every addition. This results in a n! performance. Propose replacing:
with:
in the constructor
The text was updated successfully, but these errors were encountered: