<div>Ive just started learning haskell pretty recently and Ive been trying to solve some online contest problems as part of this exercise. However, Ive been having almost no success. For various reasons my answers almost always are too slow. I recently stumbled across this link which was quite useful<br>
</div><div><a href="http://www.haskell.org/haskellwiki/SPOJ">http://www.haskell.org/haskellwiki/SPOJ</a>. This helped me speed up some of my programs where input was slowing me down.</div><div><br></div><div>But being a noob, to a large extent I don&#39;t even know why my programs are slow sometimes or how to tell what makes them slow. I&#39;ve been attempting problems from <a href="http://www.codechef.com">www.codechef.com</a> (which uses SPOJ) in actuality. Because I have an admin account I can actually compare my solution against others there (which are almost always in C/C++ or Java) to try and figure out if Im missing a trick. Recently the problem I picked up was <a href="http://www.codechef.com/problems/DDILEMMA/">http://www.codechef.com/problems/DDILEMMA/</a> and I worked through solutions that just don&#39;t seem to be fast enough. I looked at successful submissions in C++ and JAVA which seem to do mostly what I&#39;m doing (ofcourse there are differences because those are imperative languages and I might be misunderstanding things.). I&#39;ve got my program, test input that I generated, cost center analysis all up on this page. <a href="http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=5120#a5137">http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=5120#a5137</a></div>
<div><br></div><div>I&#39;ve been getting some significant help from the #haskell channel but unfortunately this hasn&#39;t helped me break the barrier I need to. So I was wondering if someone would be kind enough to help me understand the profiler output and help me understand how to improve performance in cases like this</div>
<div><br></div><div>thanks</div>