Repository navigation
Avoid temporary big-integer storage for small getrandbits calls - #9233
Conversation
Assisted-by: Codex:GPT-6
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
Generate
getrandbits(1..32)directly from one MT19937 word, avoiding the temporaryVecandBigUint. Fixed-seed output and generator state are unchanged.Performance
Release builds, median of three paired runs; each run uses five timing samples.
Windows 11 x64
getrandbits(8)getrandbits(32)randrange(100)choice(64 items)shuffle(64 items)Debian 12 amd64
getrandbits(8)getrandbits(32)randrange(100)choice(64 items)shuffle(64 items)AI assistance
Written with Codex (GPT-6), reviewed by a human before submission.
Summary by CodeRabbit