At any rate, using binary search doesn’t automatically guarantee faster runtime. Constant factors can add up, and there might not even be enough elements to warrant binary search. Benchmarking on realistic data is definitely a good idea.
On Sat, Sep 21, 2019 at 11:39 AM David Feuer <david.fe...@gmail.com> wrote: > Case matching is already optimized in GHC. There might be ways to improve > it, but it already uses binary search and/or jump tables to improve > performance when there are many branches. > > On Sat, Sep 21, 2019, 8:59 AM olexandr543--- via Haskell < > haskell@haskell.org> wrote: > >> Hello! >> >> My library that can help to optimize using 'case ... of ...' construction >> if there are multiple (more than at least 5) variants. >> mm2: The library that can be used for optimization of multiple (Ord a) => >> a -> b transformations <http://hackage.haskell.org/package/mm2> >> >> Best regards, >> Oleksandr Zhabenko. >> >> >> _______________________________________________ >> Haskell mailing list >> Haskell@haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell >> > _______________________________________________ > Haskell mailing list > Haskell@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell > -- [image: logo] Bryon Tjanaka *"Audentes fortuna iuvat"* btjanaka.netgithub.com/btjanaka
_______________________________________________ Haskell mailing list Haskell@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell