bearophile_hugs reported this on 2012-02-12T11:59:28Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=7488
CC List
- andrei (@andralex)
- lovelydear
Description
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.
lovelydear commented on 2012-04-19T08:54:38Z
See related 7487 and 7490