Skip to content
  • Andreas Klebinger's avatar
    Simplify guard in createSwitchPlan. · bc383f20
    Andreas Klebinger authored
    Given that we have two unique keys (guaranteed by Map) checking that
    `|range| == 1` is faster.
    
    The fact that `x1 == lo` and `x2 == hi` is guaranteed by mkSwitchTargets
    which removes values outside of the range.
    
    Test Plan: ci
    
    Reviewers: bgamari, simonmar
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4295
    bc383f20