Skip to content

Reduce factorization overhead and allow larger composition blocks - #188

Merged
odraccir1 merged 4 commits into
masterfrom
ra/factor_discovery_work
Oct 30, 2026
Merged

odraccir1 merged 4 commits into
masterfrom
ra/factor_discovery_work

Conversation

@odraccir1

Copy link
Copy Markdown
Collaborator

This change removes redundant factorization setup and overlapping cache lifetimes, and allows callers to select larger composition blocks for workloads with sufficient reuse.

• Emit degree groups containing one irreducible factor directly, preserving validation, callback control and RNG behavior.
• Release the initial Frobenius cache after completing the baby-step table, before constructing the giant-step cache.
• Add modular_composition_block_size, with bounded explicit sizes and the existing automatic heuristic as the default.

Baseline and cache-release runs perform complete factor discovery and norm recovery for a degree-14,938 polynomial over BN254 Fp12, verifying P²-XQ²=H, degree bounds, identical P/Q bytes and identical RNG consumption.

Clean x86 measurements show:

• Cache release reduces degree-14,938 factor discovery and norm recovery peak RSS from 8.37 to 5.70 GiB, with essentially unchanged recovery time.
• Width 246 versus 123 reduces heavily reused composition workloads by 33–34%, including cache construction.
• Larger blocks increase component RSS from 2.92 to 5.57 GiB and make single-use composition about 46% slower, so they remain opt-in.

@odraccir1
odraccir1 requested a review from spaceships October 30, 2026 17:47
@odraccir1
odraccir1 merged commit 5f2f231 into master Oct 30, 2026
2 checks passed
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