<div dir="auto">Awesome, thanks.</div><br><div class="gmail_quote"><div dir="ltr">On Sun, Feb 3, 2019, 7:35 PM Carter Schonwald <<a href="mailto:carter.schonwald@gmail.com">carter.schonwald@gmail.com</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">This is about first run branch prediction on cpus and how constructor order can influence code gen of case expressions. </div></div><div dir="auto"><br></div><div dir="auto">This is more Andreask’S wheelhouse rather than David’s. In fact Andreas has some work to make things like this easier to do in progress. </div><div dir="auto"><br></div><div dir="auto">Johan did some super detailed benchmarking when he did this and other work. Perhaps he can share with you more about how he did it. I ccd him on this email. </div><div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jan 28, 2019 at 4:44 PM chessai . <<a href="mailto:chessai1996@gmail.com" target="_blank" rel="noreferrer">chessai1996@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When looking through the source of Data.Map.Internal, there's a note:<br>
<br>
-- [Note: Order of constructors]<br>
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
-- The order of constructors of Map matters when considering performance.<br>
-- Currently in GHC 7.0, when type has 2 constructors, a forward conditional<br>
-- jump is made when successfully matching second constructor. Successful match<br>
-- of first constructor results in the forward jump not taken.<br>
-- On GHC 7.0, reordering constructors from Tip | Bin to Bin | Tip<br>
-- improves the benchmark by up to 10% on x86.<br>
<br>
I've been curious about this for a while now. GHC 7.0 was released<br>
quite a long time ago, so I wonder if this is still the case? David<br>
might know.<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div></div>
</blockquote></div>