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

Roadmap #1

Open
haampie opened this issue Dec 25, 2019 · 0 comments
Open

Roadmap #1

haampie opened this issue Dec 25, 2019 · 0 comments

Comments

@haampie
Copy link
Owner

haampie commented Dec 25, 2019

Most important right now is:

  • Implement an iterator for the segmented sieve that is efficient in the range OneTo(2^32)
  • Use that iterator to efficiently sieve a small interval a:b where a and b are roughly 2^64. The loop will then be of the form:
    # segment has constant memory
    for segment in segments(1:b)
        for p in primes(segment)
            # here we just store the full interval a:b (compressed of course)
            cross_off_multiples(a:b, p)
        end
    end
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

1 participant