Skip to content

feat(engine): optimize search pipeline for 25K+ digit candidates#1

Open
oddurs wants to merge 1 commit into
masterfrom
feat/25k-digit-engine-optimizations
Open

feat(engine): optimize search pipeline for 25K+ digit candidates#1
oddurs wants to merge 1 commit into
masterfrom
feat/25k-digit-engine-optimizations

Conversation

@oddurs

@oddurs oddurs commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Wire ECM composite pre-filter into all 4 non-KBN-reusing search forms (kbn, factorial, palindromic, primorial) — catches ~1-3% more composites where P-1 misses them
  • Raise sieve depth cap from 1B to 10B for candidates >50K bits (25K+ digits)
  • Add deeper P-1 tiers for 50-100K bits (B1=2M) and 100K+ bits (B1=5M)
  • Add deeper ECM tier for 120K+ bits (B1=3M, 30 curves)
  • Wire batch GCD (Bernstein product/remainder trees) into palindromic search as bulk pre-filter
  • Register ecm and batch_gcd modules in lib.rs (were dead code)
  • Add 3 campaign configs targeting 25K+ digit primes (kbn, factorial, palindromic)
  • Fix pre-existing LeaderboardRow field rename in integration test

Test plan

  • cargo check passes
  • All 1128 lib tests pass (7 ignored)
  • All integration/property/CLI/security tests pass
  • cargo clippy clean
  • Smoke test: cargo run --release -- kbn --k 3 --base 2 --min-n 83000 --max-n 83100
  • Verify ECM elimination messages appear in output for large candidates
  • Verify PRST/PFGW dispatch for 25K+ digit candidates on CCX23 nodes

🤖 Generated with Claude Code

Wire ECM, deeper P-1/sieve tiers, and batch GCD for large-candidate
searches targeting 25,000+ digit primes (~83K+ bits).

- Add ECM composite pre-filter after P-1 in kbn, factorial, palindromic,
  primorial (catches ~1-3% more composites with smooth curve order)
- Raise sieve depth cap from 1B to 10B for candidates >50K bits
- Add deeper P-1 tiers: B1=2M/B2=200M (50-100K bits), B1=5M/B2=500M (100K+)
- Add deeper ECM tier: B1=3M/B2=300M/30 curves for 120K+ bit candidates
- Wire batch GCD (Bernstein product/remainder trees) into palindromic search
- Register ecm and batch_gcd modules in lib.rs (were previously dead code)
- Add 3 campaign configs: kbn-25k, factorial-25k, palindromic-25k
- Fix LeaderboardRow field rename (worker_count -> node_count) in integration test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant