-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
speed up prime(n)
#102
base: main
Are you sure you want to change the base?
speed up prime(n)
#102
Conversation
The second commit here gives another 40% speedup by using a I was benchmarking wrong. It actually doesn't. |
…es.jl into oscardssmith-faster-prime
@rfourquet this is ready to review (I just made it a bunch more complicated, sorry). The good news is that this is now 2000x faster than |
@rfourquet one more question: How do you feel about making Primes.jl use multi-threading? Both this PR and #104 can be sped up more relatively via threading. |
87x faster for
prime(10^7)
. There are still much better ways of computing this functions, but this is a fairly simple, but massive improvement.