JuliaMath / JuliaMath/Primes.jl
n-th prime is too slow. Consider using primecount as a backend
Open
- Dominant language
- Julia
- Stars
- 108
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
The n-th prime function of julia is actually really slow.
For example in julia prime(10^7) runs in 14 seconds in my machine.
There is a well known C++ library with a 2-clause BSD license called primecount which can calculate
the prime(10^14) in 2 seconds (of course prime(10^7) is instantaneous.
Mathematica's Prime function is comparable to primecount (it is actually 2 times slower).
So given that, why not use primecount as a backend for the n-th prime function?
I could help with a patch if something like this sounds interesting.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.