You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 memoryfor segment insegments(1:√b)
for p inprimes(segment)
# here we just store the full interval a:b (compressed of course)cross_off_multiples(a:b, p)
endend
The text was updated successfully, but these errors were encountered:
Most important right now is:
OneTo(2^32)
a:b
where a and b are roughly2^64
. The loop will then be of the form:The text was updated successfully, but these errors were encountered: