<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Feb 22, 2015 at 11:36 PM, Jyotirmoy Bhattacharya <span dir="ltr"><<a href="mailto:jyotirmoy@jyotirmoy.net" target="_blank">jyotirmoy@jyotirmoy.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><div class="gmail_quote">On Sun, Feb 22, 2015 at 3:04 PM, Jeremy <span dir="ltr"><<a href="mailto:voldermort@hotmail.com" target="_blank">voldermort@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Compared to the Nim code<br>
[<a href="https://github.com/logicchains/LPATHBench/blob/master/nim.nim" target="_blank">https://github.com/logicchains/LPATHBench/blob/master/nim.nim</a>] for a<br>
longest path algorithm, Haskell<br>
[<a href="https://github.com/logicchains/LPATHBench/blob/master/hs.hs" target="_blank">https://github.com/logicchains/LPATHBench/blob/master/hs.hs</a>] looks<br>
horrendously verbose and ugly, even if you ignore the pragmas and imports.<br>
<br>
Is this idiomatic Haskell style? Could it be clearer, but has to be written<br>
that way for performance - although it still takes 3.7x as long as the Nim<br>
version [<a href="https://github.com/logicchains/LPATHBench/blob/master/writeup.md" target="_blank">https://github.com/logicchains/LPATHBench/blob/master/writeup.md</a>]?<br>
<br></blockquote></div></span>A clearer version<br><a href="http://lpaste.net/120981" target="_blank">http://lpaste.net/120981</a><br></div><div class="gmail_extra">though this is 2x-3x slower than the Haskell version above.<br><br></div><br></div></blockquote></div>Another version that uses mutable vectors to track the visited nodes and
 has almost the same run time as the Haskell version in the LPATHBench 
repository:<br><br><a href="http://lpaste.net/121012">http://lpaste.net/121012</a><br><br></div><div class="gmail_extra">Regards,<br></div><div class="gmail_extra">Jyotirmoy Bhattacharya<br></div></div>