You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(arithmetic): add signed radix-32 window decoder - #2
add a checked signed radix-32 ScriptNum decoder for digits in [-31, 31]
use a shared staggered magnitude lookup table for batch decoding
add deterministic correctness, malformed-input, adversarial, stack-boundary, and benchmark coverage
document measurements, comparison boundaries, limitations, negative results, and the next open problem
At 32 digits, the table construction measures 1,866 script bytes versus 2,430 for the like-for-like conditional-branch baseline, with a higher peak stack of 348 items versus 194.
Verification
cargo test --locked arithmetic::signed_window --lib
cargo test --locked --test primitive_metrics signed_window_metrics_are_current
cargo test --locked --test knowledge_base
cargo fmt --all -- --check
python3 tools/kb.py validate
cargo run --locked --release --example signed_window_benchmark
The full repository test suite was not completed, per request; its long-running generated-script tests were intentionally skipped for this PR.
Review recommendation: include after integration checks.
The signed-radix-32 decoder is a useful distinct primitive. Keep its signed-window input/output contract explicit and retain the boundary tests and focused metric check. Resolve the new catalog/negative-result IDs against #1 during integration.
Local validation: python3 tools/kb.py validate passed; 3 selected library tests passed; the active focused metric check passed. These are targeted local checks, not a full-suite or complete-spend validation. Results using a stack-limit-disabled execution helper remain research-unlimited.
Integration: rebase on #1, resolve any colliding catalog/NR/OP IDs, and run active metrics plus CI on the combined head (cargo test --locked -- --skip fields::).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[-31, 31]At 32 digits, the table construction measures 1,866 script bytes versus 2,430 for the like-for-like conditional-branch baseline, with a higher peak stack of 348 items versus 194.
Verification
cargo test --locked arithmetic::signed_window --libcargo test --locked --test primitive_metrics signed_window_metrics_are_currentcargo test --locked --test knowledge_basecargo fmt --all -- --checkpython3 tools/kb.py validatecargo run --locked --release --example signed_window_benchmarkThe full repository test suite was not completed, per request; its long-running generated-script tests were intentionally skipped for this PR.