Skip to content

benchmarks: reproducible factoring instance generator#7

Merged
isPANN merged 2 commits into
mainfrom
add-factoring-benchmarks
Jul 9, 2026
Merged

benchmarks: reproducible factoring instance generator#7
isPANN merged 2 commits into
mainfrom
add-factoring-benchmarks

Conversation

@isPANN

@isPANN isPANN commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Adds a deterministic generator for the factoring benchmark set — 10 balanced n-bit semiprimes per size (12/14/16/18/20/22), one pred-reduced CircuitSAT bundle per JSONL line.

  • benchmarks/gen_factoring.py: per-size seeding (Random(SEED_BASE + n)), so any subset regenerates byte-identically regardless of invocation order. Line 0 of each size is a pinned N (the historical single-fixture N, or the 22x22 session instance 8750074000153) so earlier results stay reproducible; the rest are random balanced semiprimes (both factors in [2^(n-1), 2^n) — the hard case).
  • Data is gitignored: the ~11 MB of benchmarks/data/*.jsonl is regenerable, so only the generator is tracked. Reproduce with python3 benchmarks/gen_factoring.py 12 14 16 18 20 22 (needs pred on PATH).

Purpose: replaces the single-instance-per-size fixtures with a proper multi-instance set for statistically meaningful benchmarking (goal C / WS0). A JSONL-reading benchmark runner is a separate follow-up.

Only adds benchmarks/gen_factoring.py and a .gitignore line — no solver code, no test changes.

🤖 Generated with Claude Code

isPANN and others added 2 commits July 9, 2026 19:35
benchmarks/gen_factoring.py emits factoring_<n>x<n>.jsonl (10 balanced n-bit
semiprimes per size, one CircuitSAT bundle per line via `pred create Factoring |
pred reduce --to CircuitSAT`). Per-size seeding makes any subset regenerate
byte-identically; line 0 of each size is a pinned N (historical fixtures / the
22x22 session instance) so prior results stay reproducible.

The 11 MB of generated JSONL under benchmarks/data/ is gitignored — reproduce
locally with `python3 benchmarks/gen_factoring.py 12 14 16 18 20 22`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nchmark set

The 12/16/18/20/22 single-instance CircuitSAT fixtures are replaced by the
10-per-size benchmark set (benchmarks/gen_factoring.py; each set's line 0 pins
the old N). None are referenced in tracked code. factoring_15.circuitsat.json
stays — tests/factoring.rs include_str!'s it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@isPANN isPANN merged commit d63b1d2 into main Jul 9, 2026
1 check passed
@isPANN isPANN deleted the add-factoring-benchmarks branch July 9, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant