prime showdown
Testing the code I posted yesterday against a basic, iterative trial division brute force prime checker.
It’s not even close…
let n = 1,000,000
# Return the nth prime number via Sieve of Eratosthenes
elapsed time: 856 ms
# Return the nth prime number via trial division
elapsed time: 458430 ms == 458.43 seconds == 7.6405 minutes