Coming soon - Get a detailed view of why an account is flagged as spam!
view details
13
[Java] Most efficient way to find prime numbers?
Author Summary
kobekramer1 is in Java
Post Body

So, I've been playing around with different data structures to see what the best way to list as many prime numbers as possible is. So far, The best I've found is Priority Queues. But, trying to list all the prime numbers up to a billion is eating my RAM. using about 3gb at the moment. Is there any faster method to finding prime numbers? and is there any efficient data structure that isn't as hard on RAM.

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
21,978
Link Karma
1,152
Comment Karma
20,750
Profile updated: 1 day ago
Posts updated: 8 months ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
12 years ago