Tags: basilegithub/Multiple-Polynomial-Quadratic-Sieve-C
Tags
Optimizations and error correction Worked to optimize the sieving step mostly. One error was made in the code, in the second loop of the case 1 in the sieving function : the formula to compute the second starting point actually returned a negative number. Since root is unsigned long, this meant that its value was actually very big, thus the program was never doing the sieving with the second root. Correcting this yielded a 2x speedup. Optimizations in the sieving function (mostly avoiding mpz functions when possible) yielded a 2x speedup. Overall, I see a ~ 4x speedup.