Skip to content

perf(sha256): reuse u4 row lookup across chunks - #91

Merged
RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:feat/sha256-u4-shared-lookup
Sep 18, 2026
Merged

RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:feat/sha256-u4-shared-lookup

Conversation

@brenorb

@brenorb brenorb commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary\n- reuse the unchanged u4 row-offset lookup table across SHA-256 chunks\n- park it on the alt stack while replacing only the XOR/AND table\n- add reproducible metrics and knowledge-base documentation\n\nFor the representative 80-byte input, the fragment is 736,595 bytes, saving 11 bytes per additional chunk versus reloading both tables.\n\n## Validation\n- cargo fmt --all -- --check\n- cargo test --locked hashes::sha256::sha2_u4::tests::test_sha256_two_blocks --lib\n- cargo test --locked hashes::sha256::sha2_u4::tests::test_sha256_strs --lib\n- cargo test --locked --test primitive_metrics sha2_u4_shared_lookup_metrics_are_current\n- python3 tools/kb.py validate\n- git diff --check

@RobinLinus
RobinLinus merged commit a255fbc into solving-bitcoin:main Sep 18, 2026
3 checks passed
@brenorb
brenorb deleted the feat/sha256-u4-shared-lookup branch October 28, 2026 02:57
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.

2 participants