Skip to content
  • tibbe's avatar
    Add SmallArray# and SmallMutableArray# types · 90329b6c
    tibbe authored
    These array types are smaller than Array# and MutableArray# and are
    faster when the array size is small, as they don't have the overhead
    of a card table. Having no card table reduces the closure size with 2
    words in the typical small array case and leads to less work when
    updating or GC:ing the array.
    
    Reduces both the runtime and memory allocation by 8.8% on my insert
    benchmark for the HashMap type in the unordered-containers package,
    which makes use of lots of small arrays. With tuned GC settings
    (i.e. `+RTS -A6M`) the runtime reduction is 15%.
    
    Fixes #8923.
    90329b6c