2012/12/11 Stephen Bloch <[email protected]>:
> Would it perhaps make more sense for small-primes to contain primes
> themselves, in increasing order so one can be found by binary search, rather
> than booleans? The O(1) behavior would be replaced by O(log(limit)), but
> perhaps you would save enough memory to put the limit higher.
I think there are too many primes.
Since
> (require math)
> (nth-prime 78498)
1000003
there are 78497 primes below a million. On a 64 bit machine
that requires 8*78497 = 627976 bytes.
--
Jens Axel Søgaard
____________________
Racket Users list:
http://lists.racket-lang.org/users