The code in this repository provides an example of how to use [Web Workers][WebWorkers] on the browser and take advantage of parallel computing. For the sake of demonstration, a simple algorithm to compute coprime numbers is presented. Specifically, we need to find all coprime numbers from 1 to 1x10^6 such that added together sum the number of the beast (666).
To compute the coprime numbers, I use an algorithm called Euclid's algorithm. For each number GCD(i, 666) == 1
is done and if it holds, such number i
is added to the final result.
Check it out at: https://gomezhyuuga.github.io/web-workers/