JuliaMath / JuliaMath/Primes.jl

n-th prime is too slow. Consider using primecount as a backend

Open
#99 21 comments 1 reaction 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.