I have written two articles on this, along with benchmarks, to see what methods are faster.
Prime Numbers with Python was written before the knowledge of the Baillie-PSW
primality test.
Prime Numbers with Python v2 was written afterwards, benchmarking the Lucas pseudoprimes
and the Baillie-PSW
primality test.