• Simon Marlow's avatar
    Make clearNursery free · e22bc0de
    Simon Marlow authored
    clearNursery resets all the bd->free pointers of nursery blocks to
    make the blocks empty.  In profiles we've seen clearNursery taking
    significant amounts of time particularly with large -N and -A values.
    This patch moves the work of clearNursery to the point at which we
    actually need the new block, thereby introducing an invariant that
    blocks to the right of the CurrentNursery pointer still need their
    bd->free pointer reset.  This should make things faster overall,
    because we don't need to clear blocks that we don't use.
    Test Plan: validate
    Reviewers: AndreasVoellmy, ezyang, austin
    Subscribers: thomie, carter, ezyang, simonmar
    Differential Revision: https://phabricator.haskell.org/D318
all.T 6.06 KB