Bug 20548 – Use bit vector instead of bool[] in RandomCover when choices cannot be packed in a single word

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-01-31T06:06:15Z
Last change time
2020-02-03T11:00:33Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2020-01-31T06:06:15Z
RandomCover has had a non-allocating optimization for small sizes since PR #6576 but for larger sizes still uses 1 byte per flag which can be improved.
Comment #1 by dlang-bot — 2020-01-31T06:17:54Z
@n8sh created dlang/phobos pull request #7387 "Fix Issue 20548 - Use bit vector instead of bool[] in RandomCover when choices cannot be packed in a single word" fixing this issue: - Fix Issue 20548 - Use bit vector instead of bool[] in RandomCover when choices cannot be packed in a single word https://github.com/dlang/phobos/pull/7387
Comment #2 by dlang-bot — 2020-01-31T08:07:23Z
dlang/phobos pull request #7387 "Fix Issue 20548 - Use bit vector instead of bool[] in RandomCover when choices cannot be packed in a single word" was merged into master: - 9014d77ab028b70d80dd6e93ff60b9744bd1780c by Nathan Sashihara: Fix Issue 20548 - Use bit vector instead of bool[] in RandomCover when choices cannot be packed in a single word https://github.com/dlang/phobos/pull/7387
Comment #3 by dlang-bot — 2020-02-03T11:00:33Z
dlang/phobos pull request #7390 "Issue 20548 followup: in 32-bit builds RandomCoverChoices allocates more memory than needed for the bit vector" was merged into master: - 67e4a0868472945818e9a417ea3c0ca4645b5fab by Nathan Sashihara: Issue 20548 followup: in 32-bit builds RandomCoverChoices allocates more memory than needed for the bit vector https://github.com/dlang/phobos/pull/7390