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

efficient subset query for ranges #32461

Closed
mcabbott opened this issue Jul 1, 2019 · 2 comments · Fixed by #32463
Closed

efficient subset query for ranges #32461

mcabbott opened this issue Jul 1, 2019 · 2 comments · Fixed by #32463
Labels
good first issue Indicates a good issue for first-time contributors to Julia help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@mcabbott
Copy link
Contributor

mcabbott commented Jul 1, 2019

issubset(1:5, 1:10^18) gives an OutOfMemoryError() on Julia 1.1, although it works on 0.6.

From the source I see #26198 is the change, which creates a Set when the 2nd vector has length > 70, and #28871 disables this for objects without a length. I guess the minimal fix is also to disable this for ranges.

But there is no need to do this by iteration. I assumed that because intersect(1:10, 1:10^18) knows to return a range, this would behave similarly. Should we add similar methods to issubset?

@rfourquet
Copy link
Member

In the general case (when the first argument is not a range), this is fixed by #32003.

@StefanKarpinski StefanKarpinski changed the title subsets of ranges efficient subset query for ranges Jul 1, 2019
@StefanKarpinski
Copy link
Member

Seems like some specialized methods for this would make sense.

@mbauman mbauman added good first issue Indicates a good issue for first-time contributors to Julia help wanted Indicates that a maintainer wants help on an issue or pull request labels Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Indicates a good issue for first-time contributors to Julia help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants