AWK is a scripting language created by Alfred Aho, Peter Weinberger and Brian Kernighan for simple text processing.
The algorithm is the same showed by Dave Plummer in his C++ implementation
$ docker build -t drag-race .
$ docker run drag-race
Awk comes preinstalled with most Linux systems
$ awk -F "," -f primes.awk counts.csv
Awk needs a file to operate on and to create an associative array with the counts.
Some results I've got in my machine
Passes: 14, Time: 5, Average: 0.357143, Count: 78498, Valid: 1
Passes: 11, Time: 5, Average: 0.454545, Count: 78498, Valid: 1
Passes: 13, Time: 5, Average: 0.384615, Count: 78498, Valid: 1
Passes: 12, Time: 5, Average: 0.416667, Count: 78498, Valid: 1
Passes: 13, Time: 5, Average: 0.384615, Count: 78498, Valid: 1