Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faster prime sieve part 1 #120

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

oscardssmith
Copy link
Member

Before _primesmask(2^30) took 2.726 seconds after it took 2.358s. Although this is a relatively small improvement overall, it removes ~100% of the time for the small primes (250ms vs 30ms) which means that this will continue to show large gains once we optimize the larger primes.

I've also separated sieving into it's own file since I expect the code will become more complex as we move to better sieves.
@haampie since this is essentially part 1 of #87.

before `_primesmask(2^30)` took 2.726 seconds after it took  `2.358s`.
@oscardssmith oscardssmith changed the title Oscardssmith faster sieve part 1 faster prime sieve part 1 Jun 13, 2022
@oscardssmith oscardssmith reopened this Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant