Well, if that is so likely, it must be easy to give an example. 
For which reasonable large interval is it faster to generate than to read
all primes?


R.E. Boss


> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:programming-
> [email protected]] Namens Zsbán Ambrus
> Verzonden: maandag 20 april 2009 19:37
> Aan: Programming forum
> Onderwerp: Re: [Jprogramming] table of primes to 1,000,000,000 or more
> 
> On Sun, Apr 19, 2009 at 6:53 PM, R.E. Boss <[email protected]> wrote:
> >> Also, a table of primes is never worth to download or store, as it's
> >> faster to generate them online than reading them.
> 
> > This "never" seems incorrect, assumed reading is linear (in the number
> of
> > primes) and generating is not.
> > How long took it to generate the largest known prime? Definitely longer
> than
> > reading it.
> > So there is a prime after which is it worthwhile to store the larger
> primes.
> 
> The point is, it's not worth to store a table of _all primes_ up to a
> certain number.  Sure, just reading a single prime can be fast, but if
> you want to get all the primes in a reasonably large interval, it's
> likely faster to generate them then to store them.
> 
> Ambrus
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to