[Issue 7488] New: Short array optimization for std.bitmanip.BitArray

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 12 11:59:29 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7488

           Summary: Short array optimization for std.bitmanip.BitArray
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-02-12 11:59:28 PST ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list