• Simon Peyton Jones's avatar
    Add -fspec-constr-keen · 4f38fa10
    Simon Peyton Jones authored
    I discovered that the dramatic imprvoement in perf/should_run/T9339
    with the introduction of join points was really rather a fluke, and
    very fragile.
    
    The real problem (see Note [Making SpecConstr keener]) is that
    SpecConstr wasn't specialising a function even though it was applied
    to a freshly-allocated constructor.  The paper describes plausible
    reasons for this, but I think it may well be better to be a bit more
    aggressive.
    
    So this patch add -fspec-constr-keen, which makes SpecConstr a bit
    keener to specialise, by ignoring whether or not the argument
    corresponding to a call pattern is scrutinised in the function body.
    Now the gains in T9339 should be robust; and it might even be a
    better default.
    
    I'd be interested in what happens if we switched on -fspec-constr-keen
    with -O2.
    
    Reviewers: austin, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D3186
    4f38fa10
all.T 18.7 KB