There was a Perl Monks node a while back that discussed several different methods of calculating large numbers of primes. The one that seemed to be most efficient (based on my own trials) was an implementation of the Sieve of Eratosthenes using vec attributed to merlyn. See Re: To Findout Prime number.
Best, beth
In reply to Re: Find prime number between 1 to 1000000
by ELISHEVA
in thread Find prime number between 1 to 1000000
by mecrazycoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |