Demonstrates how to use Web Workers, transfers and SharedArrayBuffer.
This repository accompanies this blog post on Javascript parallelism.
The blog post illustrates parallelism in JavaScript using a sample application to find prime numbers. This repository contains different versions of this application.
/main-threadcontains the simplest version that is blocking the main thread/simple-workercontains the application using a single worker thread instead of blocking the main thread/dividing-workeruses multiple workers, cloning the data/transferring-workeris using multiple workers but transfers data rather than cloning it/shared-buffer-workercontains a version that uses aSharedArrayBufferto avoid cloning or the downside of transferring data