Bug 7488 – Short array optimization for std.bitmanip.BitArray

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-12T11:59:28Z
Last change time
2024-12-01T16:14:53Z
Keywords
bootcamp
Assigned to
No Owner
Creator
bearophile_hugs
See also
http://d.puremagic.com/issues/show_bug.cgi?id=7487
Moved to GitHub: phobos#9588 →

Comments

Comment #0 by bearophile_hugs — 2012-02-12T11:59:28Z
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 by lovelydear — 2012-04-19T08:54:38Z
See related 7487 and 7490
Comment #2 by robert.schadek — 2024-12-01T16:14:53Z
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