<div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font face="Courier New" size="2">I wonder if there are "tricks"
or lore that could be applied to get better results or insight.</font>
<br><font face="Courier New" size="2">t.</font></blockquote><div><br>Just a quick note, I doubt ghc -e does any optimizations. You'd probably get better results by putting these tests in files and compiling with -O2. In particular I wonder whether that would stop the Prelude sort from blowing the stack.