> On Mar 4, 2018, at 1:40 PM, Bakul Shah <ba...@bitblocks.com> wrote: > > >> On Mar 4, 2018, at 12:43 PM, ralphdoncas...@gmail.com wrote: >> >> I am curious to see how you implemented the table lookup. Is the code >> posted somewhere? > > This should easy. Check all odd numbers against primes <= square root of the > candidate number and if prime, add it to primes list. Convert it to a bitmap > and > print it out as 1K 64bit Numbers. You can only store odd numbers in which case > it would be a vector of 512 such numbers!
One more point. A bitmap representation may not be the best choice. Storing differences between consecutive primes may be worth looking at. For primes < 65536, such a diff fits in a byte so you only need 6540 bytes or so. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.