D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20548 - Use bit vector instead of bool[] in RandomCover when choices cannot be packed in a single word
Summary: Use bit vector instead of bool[] in RandomCover when choices cannot be packed...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-01-31 06:06 UTC by Nathan S.
Modified: 2020-02-03 11:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nathan S. 2020-01-31 06:06:15 UTC
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 Dlang Bot 2020-01-31 06:17:54 UTC
@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 Dlang Bot 2020-01-31 08:07:23 UTC
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 Dlang Bot 2020-02-03 11:00:33 UTC
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