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

combinations, partitions functions should return iterators #3989

Closed
stevengj opened this issue Aug 8, 2013 · 8 comments · Fixed by #4055
Closed

combinations, partitions functions should return iterators #3989

stevengj opened this issue Aug 8, 2013 · 8 comments · Fixed by #4055
Labels
kind:breaking This change will break code performance Must go faster

Comments

@stevengj
Copy link
Member

stevengj commented Aug 8, 2013

See this mailing-list discussion.

As @StefanKarpinski notes, the combinations function should really return an Iterator type; the task-based interface was doubtless easier to implement but is harder to use.

Furthermore, it looks like we have a little ways to go in order to beat the CPython itertools.combinations function.

@StefanKarpinski
Copy link
Sponsor Member

The partitions function should likewise be improved. We probably want iterable permutations and subsets functions as well.

JeffBezanson added a commit that referenced this issue Aug 8, 2013
@JeffBezanson
Copy link
Sponsor Member

Now we are significantly faster.

@stevengj
Copy link
Member Author

stevengj commented Aug 8, 2013

Nice! But a hornéd hat of shame for not updating the documentation...

@JeffBezanson
Copy link
Sponsor Member

drat. thanks for the reminder.

@stevengj
Copy link
Member Author

Is this now done? Can we close the issue and add a NEWS item?

@JeffBezanson
Copy link
Sponsor Member

The integer and set partitions functions haven't been converted yet.

@kmsquire
Copy link
Member

I should be submittiing these in a few minutes.

@JeffBezanson
Copy link
Sponsor Member

Kevin you're a beast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:breaking This change will break code performance Must go faster
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants