This algorithm utilizes memoization. This means it uses cached results so that repeating the same calculation is super fast.
If you want to see how many primes you can get this site to return, start with small numbers and work your way up.
Depending on your environment, you should be able to get into the tens of millions
But if you start too high, the browser will crash; since this is all client-side logic.
Primes between 1 and