Sieve of Eratosthenes

A JavaScript vs. WebAssembly Prime Number Generator Benchmark

Run Benchmark
Loading ...

JavaScript

Run the tests the display the results

{{ stats.javascript.totalTime }}
Total Time (ms)
{{ stats.javascript.meanTime }}
Mean Time Per Round (ms)
Round #{{ result.round }}
500.000 prime numbers in {{ Math.round(result.time) }} ms

Rust-generated WebAssembly

Run the tests the display the results

{{ stats.webassembly.totalTime }}
Total Time (ms)
{{ stats.webassembly.meanTime }}
Mean Time Per Round (ms)
Round #{{ result.round }}
500.000 prime numbers in {{ Math.round(result.time) }} ms
Fork me on GitHub