Weekly exercise 5: Improving Sieves of Eratosthenes algorithm