## SIEVE OF ERASTHONES

### 3/16/96

Sieve of Erasthones: A CPU benchmark popular in the early days of PCs. It is easily coded in virtually any programming language. It allows very different computers and languages to be compared. It is a memory intensive determination of the first 100 prime numbers using a method devised by the ancient Greek mathematician Erasthones. Create a 1000 entry array. Remove all numbers divisible by 2. Then all divisible by 3, all divisible by 4, ... etc. Upon completion, the array contains only prime numbers. The general practice is to optimize the computation in some ways, but not necessarily in all ways. For example computation is usually stopped at multiples of 32. 32*32=1024 because any factor greater than 32 will already have been removed. But it is usual to remove multiples of non-primes such as 4 even though it is faster to remove only multiples of primes (If you already know the answer, why do the computation?). The benchmark has been little used in recent years and might unduly reward/penalize CPUs for small variations in cache size and characteristics.