https://github.com/jasory/terprime
Counting, checking, and listing primes
https://github.com/jasory/terprime
Last synced: 11 months ago
JSON representation
Counting, checking, and listing primes
- Host: GitHub
- URL: https://github.com/jasory/terprime
- Owner: JASory
- License: agpl-3.0
- Created: 2023-10-27T22:52:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-23T23:15:06.000Z (over 1 year ago)
- Last Synced: 2025-06-18T07:46:08.329Z (12 months ago)
- Language: Rust
- Size: 39.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terprime
Counting, checking, and listing primes under 2^64
## About
Terminal prime is an alternate approach to Kim Walisch's [primesieve](https://github.com/kimwalisch/primesieve). While primesieve performs calculations using sieving, terprime checks each individual integer for primality. This means that it can be faster than primesieve for small intervals (around 100 million) of relatively large integers, as it does not need to perform all the computations that are used in sieving large integers.
In general however, terprime is considerably slower than primesieve, taking approximately 35,096 core-years to enumerate all primes from 0 to 2^64. However both are fast enough that outside of number-theory research they can produce more primes per second (> 400k) than a typical application would ever need.