Category: Algorithms
-
Fast Parallel Sieve of Eratosthenes in Java
Recently I was playing a little with prime numbers and I needed a prime number generator for which I wrote a sieve of Eratosthenes in Java. Since I wanted all primes up to 10^9, I became a little impatient about the time taken to generate those primes. So I started to optimize it incrementally. Also…