<div dir="auto">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.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 21, 2019, 8:59 AM olexandr543--- via Haskell <<a href="mailto:haskell@haskell.org">haskell@haskell.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_1040706522574495840yahoo-style-wrap" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px"><div dir="ltr"><div><div dir="ltr" style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px">Hello!</div><div dir="ltr" style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px"><br></div><div dir="ltr" style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px">My library that can help to optimize using 'case ... of ...' construction if there are multiple (more than at least 5) variants.</div><div dir="ltr" style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px"><a href="http://hackage.haskell.org/package/mm2" class="m_1040706522574495840ydp86ca36e6yiv6648260616enhancr_card_9664356901" style="color:rgb(25,106,212);text-decoration-line:underline" rel="nofollow noreferrer" target="_blank">mm2: The library that can be used for optimization of multiple (Ord a) => a -> b transformations</a></div><div dir="ltr" style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px"><br></div><div dir="ltr" style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px">Best regards,</div><div dir="ltr" style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px">Oleksandr Zhabenko.</div><div><br></div></div><br></div></div></div>_______________________________________________<br>
Haskell mailing list<br>
<a href="mailto:Haskell@haskell.org" target="_blank" rel="noreferrer">Haskell@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell</a><br>
</blockquote></div>