Question d’entretien chez Gentex Corporation

How would you optimize the prime number algorithm for size vs speed?