Skip to content
  • Ben Gamari's avatar
    UnVarGraph: Improve asymptotics · a70bab97
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    This is a redesign of the UnVarGraph data structure used by the call
    arity analysis to avoid the pathologically-poor performance observed in
    issue #18789.  Specifically, deletions were previously O(n) in the case
    of graphs consisting of many complete (bipartite) sub-graphs. Together
    with the nature of call arity this would produce quadratic behavior.
    
    We now encode deletions specifically, taking care to do some light
    normalization of empty structures. In the case of the
    `Network.AWS.EC2.Types.Sum` module from #19203, this brings the
    runtime of the call-arity analysis from over 50 seconds down to less
    than 2 seconds.
    
    Metric Decrease:
        T15164
        WWRec
    a70bab97