# kimwalisch/primesieve

🚀 Fast prime number generator

Repository: https://github.com/kimwalisch/primesieve
Canonical: https://ross.abutalabs.com/products/primesieve
Language: C++
License: BSD-2-Clause
License Family: permissive
Topics: prime-numbers, sieve-of-eratosthenes, math, eratosthenes, primes, sieve, avx512, arm-neon, arm-sve, number-theory, stress-testing, primesieve, benchmark, prime-sieve
Last push: 2026-08-24T07:54:21+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 81, longevity 100
- inputs: {"age_days": 4726, "days_push": 9, "days_rel": 47, "gap_med": 41.5, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1111, forks 137 (observed 2026-08-28T04:03:37.599866+00:00)

## What it is
primesieve is a fast command-line program and C/C++ library for generating prime numbers and prime k-tuplets up to 2^64 using a segmented sieve of Eratosthenes with wheel factorization. It is cache-efficient, auto-detects CPU cache sizes, and is multi-threaded by default.

## Use cases
- generate all primes up to a large limit like 1e10
- count primes below a number quickly
- print twin primes or other prime k-tuplets
- generate primes into a text file
- embed a fast prime generator in a C or C++ program
- benchmark CPU sieve performance

## When to choose
- you need extremely fast prime generation up to very large bounds (up to 2^64)
- you want a simple CLI for counting or listing primes
- you need a C/C++ library API for primes in your own code
- you want multi-threaded, cache-optimized sieving out of the box

## When to avoid
- you need primality testing of individual large numbers rather than sieving ranges
- you need arbitrary-precision primes beyond 2^64
- you work in a language without C bindings and only need small prime lists

## Facets
- artifact type: library
- maturity: stable
- function: math, cli, benchmarking
- domain: mathematics, performance
- platform: windows, bsd, cpp, c, cross-platform, cli
- tags: prime-numbers, sieve-of-eratosthenes, number-theory, simd, multithreaded, high-performance-computing, algorithms, command-line, linux, macos

## Member repositories
- kimwalisch/primesieve (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:37.599866+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:43:23.874855+00:00, confidence not recorded.
  - readme: https://github.com/kimwalisch/primesieve (fetched 2026-08-28T04:03:37.599866+00:00, sha d33b1d738fa6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
