Dedicated Web Workers provide a simple means for web content to run scripts in background threads. Web workers are able to utilize multi-core CPUs more effectively.
Crunch can be loaded as a web worker, simply by providing the crunch script new Worker("crunch.js"). Messages are then used to request calculations and return results.
Using a web worker allows for several calculations to be done in parallel while not affecting page responsiveness.
The prime numbers generated on this page can be verified using the openssl library, for example: openssl prime NUMBER
« Back to Examples