Skip to content

Editorial research note / Prime numbers under a resource gate

Miller-Rabin against the sieve: the winner depends on the regime

2026-10-02 · Last git commit date of the charter that records the measurements · result

Question
On windows of 4,096 integers, does an exact group-order test (deterministic Miller-Rabin) beat the segmented sieve, and on which axis?
Result
They trade places by regime. Against an isolated cached prime list Miller-Rabin wins from about 1e13, and against a freshly built frame from about 1e10 to 1e11, while a dense bucket scan keeps the sieve ahead per window at every size measured. On the test machine Miller-Rabin still won an isolated 1e18 batch on both axes, and the streamed sieve overtook it on wall time only beyond roughly 14 M cells.
Limits
Wall time is a companion measure only, and the frozen word-RAM step trace was still pending, so the Pareto gate stayed pending. A batched strong-test sharing that gained 10 to 20 percent wall-clock in Python was worse on abstract steps: the canonical case of a wall-clock win that is not a resource win. Deterministic Miller-Rabin is proved only below 3.3e24.
Next question
Can any lift locate primes in a short window with fewer steps than the sieve and less memory than its frame?
4,096 integers

Window size

Source & quoted measure
Field = prime-indicator windows of 4,096 integers at 1e6 ... 1e18

Law-meter version 3 charter, measured facts and prime acceptance suite

MR wins from about 1e13; fresh frame: from about 1e10 to 1e11

Crossovers by regime

Source & quoted measure
the Miller-Rabin window decoder and the segmented sieve trade places by regime (isolated cached list: MR wins from about 1e13; fresh frame: from about 1e10 to 1e11; dense bucket scan: the sieve wins per window at every x measured

Law-meter version 3 charter, measured facts and prime acceptance suite

roughly 14 M cells

Where the streamed sieve overtakes Miller-Rabin on wall time

Source & quoted measure
on this machine MR still wins an isolated 1e18 batch on both axes and the streamed sieve overtakes MR on wall time only beyond roughly 14 M cells

Law-meter version 3 charter, measured facts and prime acceptance suite

10 to 20 percent

Batched test sharing, Python wall-clock gain

Source & quoted measure
exact masks, 10 to 20 percent Python wall-clock at 12 to 20 digits, abstract steps WORSE by b^2 under schoolbook

Law-meter version 3 charter, measured facts and prime acceptance suite

3.3e24

Proved range of deterministic Miller-Rabin

Source & quoted measure
deterministic MR is proved only below 3.3e24

Law-meter version 3 charter, measured facts and prime acceptance suite

Provenance

What the retained source says.

The guide above is editorial. The passages below are source quotations. A fingerprint identifies the retained source bytes; it does not establish the scientific claim by itself. Availability is stated for each source.

01 / Law-meter version 3 charter, measured facts and prime acceptance suite

Selected source passage; full source not published

the frozen word-RAM primitive trace is still pending and the Pareto gate stays PENDING.

Source fingerprint · SHA-256 4fdd6f36e55955fff7660882c814c83138919c076d9745fa38a73d219a875d40 · 33,984 bytes

Law-meter version 3 charter, measured facts and prime acceptance suite · excerpt

02 / Working note: the prime-pattern challenge

Selected source passage; full source not published

gate resources on ABSTRACT STEPS (machine-independent), never wall-clock -- a measured wall-clock "win" can be pure call-overhead; the abstract-step gate is what catches it.

Source fingerprint · SHA-256 0dd8371429e7fc28efa7058196e3f08df24a252ef6325c2eab5a07edb615e3f4 · 83,008 bytes

Working note: the prime-pattern challenge · excerpt

Research direction: Anthony Michael Collado.
Original credits remain with each source. Source passages, editorial guides and unreviewed source-index notes are distinguished in the research record.