@fast_blast i guess you must have familiarized yourself with https://en.wikipedia.org/wiki/Generation_of_primes and GIMPS? To those that stumbled upon this post which might not be aware, current generators are pretty much either supercomputers or clusters of such, looking for those primes, and they are huge.
So I surely don't want to discourage you, maybe you'd then need a unorthodox approach, otherwise competing is going to be difficult :) if you just want to learn, then I don't think compiler would limit you.