Conversation
jaydgoss
added this pull request to stack #188
September 25, 2026 01:55
jaydgoss
marked this pull request as draft
September 25, 2026 01:58
jaydgoss
removed this pull request from stack #188
September 25, 2026 02:10
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Cut the digest-to-remainder step from about 61 ns to 2 ns by replacing
BigIntwith fixed-width arithmetic. These are isolated local release-mode measurements on an Apple M4 Max, not full feature-check or request timings.This removes a repeated cost in #184: new flags calculate a feature-specific hash on each check instead of reusing the cached identity-only hash.
Replace the
BigIntconversion inFeatureContext::compute_id()with fixed-width arithmetic. This change preserves the SHA-1 input and the resulting bucket IDs.1_000_000_000. Reducing after each word gives the same result as converting the whole digest first.1_000_000_000 × 2³² < 2⁶², so it fits in au64without heap allocation.numfrom runtime dependencies to test dependencies.BigIntcalculation through the existingFeatureContext::id()API.This draft is a possible future optimization for #184, not its base or a release dependency. #184 keeps the existing
BigIntcalculation and only removes the temporary feature-name prefix allocation. This PR does not add feature-specific hashing, cutoff handling, or a new cache. The existing ID cache is unchanged, so repeated checks that already use a cached ID do not gain this optimization.Validation
cargo test -p sentry-options --lib: 97 tests passed.cargo fmt --all -- --check: passed.cargo clippy --workspace --all-features --tests -- -D clippy::all: passed.git diff --check: passed.