Klaus-E-J/Prime-Generator ? reverse-engineered prompt

Reverse engineered prompt

Build me a fast C++ prime number generator that can generate lots of primes without using too much memory, and save them into a binary file.

I also want a simple loader program that opens that .bin file and prints the primes back out so I can check what was written. Please keep the generator focused on performance, since it should handle large ranges efficiently, and use multi threading if that makes sense. If you need to look up any current compiler details or best practices, feel free to do that.

Make it easy to compile from the command line, and keep the code clean and straightforward so I can run the generator first, then run the loader to verify the output.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab