Issue 7488 - Short array optimization for std.bitmanip.BitArray
Summary: Short array optimization for std.bitmanip.BitArray
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords: bootcamp
Depends on:
Blocks:
 
Reported: 2012-02-12 11:59 UTC by bearophile_hugs
Modified: 2024-12-01 16:14 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2012-02-12 11:59:28 UTC
An optimization for std.bitmanip.BitArray: when BitArray.length <= (size_t.sizeof * 8), then BitArray.ptr stores the bit themselves (so ptr is in a union with a size_t).

If the array of bits is short, this saves a GC allocation, increasing performance and reducing the amount of memory used and garbage produced.
Comment 1 SomeDude 2012-04-19 08:54:38 UTC
See related 7487 and 7490
Comment 2 dlangBugzillaToGithub 2024-12-01 16:14:53 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/9588

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB