Performance improvement

Use only local variables in the sieving algorithm.