for (unsigned int nVariableMultiplier = nSolvedMultiplier; nVariableMultiplier < nSieveSize; nVariableMultiplier += nPrime)
vfCompositeCunningham1[nVariableMultiplier] = true;
How can we examine this algorithm and hopefully come up with a more optimized version? Could this not be handled by filling a with a prime table? Or is there necessary computation going on there?
Disclaimer: I'm not a strong math guy nor am I a strong C++ programmer, but I can at least look at the algorithms.
My first intro to the sieve was in an Abstract Algebra course. and for large numbers, the sieve can get quite tedious and will definitely take time...but the list of primes can also get quite long and if there's a search of the list for collusion before inserting the prime in the list then this will also take time. I'm also thinking about this and I've been working to port the code via openCL.