Its interesting to look at the speed of JS. You can see, from the above results that the sieve is testing of the order of ten million numbers a second (but that depends on the speed of your PC of course). I found some notes on a similar sieve that I wrote back in February 1988, some 30 years ago. Here are the benchmarks for that test, for testing numbers up to 8191.
The fastest of those is managing just 3200 tests per second, so it is some 3000 times slower than JS running on my laptop in Windows 10. I suppose you would expect that sort of increase in performance, as clock speeds are, say, 1000 times faster and bus-bandwidth 8 times greater, giving a potential 8,000 times improvement factor.
This page created on 02-Aug-2019. Latest modifications: 28-Aug-2021