View Single Post
Old 2019-05-09, 22:34   #2
hansl
 
hansl's Avatar
 
Apr 2019

5·41 Posts
Default

Another idea would be to create a large sieve bitfield, where each 1 bit represents a prime.
By once again ignoring the only even prime 2, we could cut the bitfield in half
2^32/8/1024/1024/2 = 256 MiB

Simple, but not as effective as the prime gap idea.
hansl is offline   Reply With Quote