• Simon Marlow's avatar
    GC refactoring, remove "steps" · 214b3663
    Simon Marlow authored
    The GC had a two-level structure, G generations each of T steps.
    Steps are for aging within a generation, mostly to avoid premature
    Measurements show that more than 2 steps is almost never worthwhile,
    and 1 step is usually worse than 2.  In theory fractional steps are
    possible, so the ideal number of steps is somewhere between 1 and 3.
    GHC's default has always been 2.
    We can implement 2 steps quite straightforwardly by having each block
    point to the generation to which objects in that block should be
    promoted, so blocks in the nursery point to generation 0, and blocks
    in gen 0 point to gen 1, and so on.
    This commit removes the explicit step structures, merging generations
    with steps, thus simplifying a lot of code.  Performance is
    unaffected.  The tunable number of steps is now gone, although it may
    be replaced in the future by a way to tune the aging in generation 0.
Compact.c 24 KB