Conversation
Reuse values already within the unsigned 64-bit range instead of rebuilding BigInteger backing arrays to apply an identical mask. Negative and out-of-range values retain the modular masking path. Generated with Codex (https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
Generated with Codex (https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
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
Avoid repeated
BigIntegermodular masks when a numeric bitwise operand or result is already within the unsigned 64-bit range. Negative and out-of-range values retain the existing mask path.This is a general runtime improvement for ordinary numeric bitwise operations, not a method-body specialization.
Validation
zzzz_iv64_unsigned_bitwise.tpassed (17 assertions).makepassed forb26307132(/tmp/make-perf-runtime-profile-bitwise-20260919.log).make check-linkspassed (/tmp/check-links-perf-bitwise-mask-20260919.log).Performance evidence
JFR on the representative Life workload confirms the intended reduction in broad runtime cost:
BigInteger.andsamples: 237 to 49.BigIntegerallocation samples: 692 to 298.int[]allocation samples: 858 to 293.The complete seven-workload candidate portfolio completed successfully at
/tmp/perf-bitwise-mask-production-20260919/20260919T021914Z/portfolio.json. Its Life ratio was 0.442x Perl versus the earlier master artifact's 0.382x; the complete candidate artifact is explicitly non-authoritative because two unrelated JSON JVM warmups did not stabilize.To attribute the target effect under the production protocol, a sequential protocol-compliant Life B/C/B bracket was run. All three analyzer reports are authoritative and stable:
/tmp/perf-bitwise-life-bracket-baseline-a-20260919/20260919T030841Z/portfolio.json./tmp/perf-bitwise-life-bracket-candidate-20260919/20260919T031559Z/portfolio.json./tmp/perf-bitwise-life-bracket-baseline-b-20260919/20260919T032308Z/portfolio.json.Candidate throughput is 1.172x the geometric mean of the bracketing master controls. This is an incremental Life/workload result, not a claim of whole-portfolio Perl parity.