mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-25 15:03:46 +00:00
Phase 0 implementation revealed that the original PRD §6 targets (50 ns / 200 ns for is_prime_u64 worst case) were structurally unachievable in safe Rust on Apple-silicon. Apples-to-apples competitor benchmark in the same binary on the same machine measured num-prime 0.4.4 at 884 ns vs ours at 15.63 µs — ~17.7× headroom recoverable via Montgomery reduction in Phase 0.1, but not the ~300× the original target implied. The 50 ns figure was a pre-implementation estimate that did not survive contact with measured hardware. ADR-151 (docs/adr/ADR-151-miller-rabin-prime-optimizations.md) - Status promoted from "Proposed" to "Accepted (Phase 0 landed 2026-04-16; performance targets revised)". - New "Phase 0 Findings (2026-04-16)" section documenting what landed, measurements vs original targets, num-prime competitor baseline, the revised target band, and Phase 0.1 scope (Montgomery only). - Explicit rejection of swapping to the empirical 7-witness set: Sinclair-12 is theorem-proven across all u64; the 7-witness sets in the literature are empirically tested up to 2^64 but not proven, and swapping invalidates the A014233(11) canary in the pseudoprime test. PRD §6 (docs/research/miller-rabin-optimizations/PRD.md) - Revision header noting the relaxation. - is_prime_u64(p) worst-case row updated to ≤ 1 µs (was 50 ns) M-series / ≤ 4 µs (was 200 ns) WASM. - New §6.1 "Empirical findings (Phase 0)" with the measurement table and the num-prime baseline data. GROK-REVIEW-REQUEST.md (new, 424 lines) - Self-contained briefing used to obtain external Grok review of the Phase 0 design and Phase 0.1 plan: §1 binding context, §2 implementation embedded verbatim, §3 measurements + competitor baseline, §4 four-section ask (correctness, perf plan ranked, architecture, validation methodology), §5 response format. Constraints block forbids "just use num-prime" answers and pins the canary witness set. |
||
|---|---|---|
| .. | ||
| GROK-REVIEW-REQUEST.md | ||
| HANDOFF.md | ||
| PRD.md | ||