<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Kevin,<br>
    <br>
    Interesting point.<br>
    <br>
    Over the past few weeks as part of my work, I have interviewed a
    large numbers of Haskell developers from many different industries&nbsp;
    and have been hearing the same points you are making. Space leaks
    that were address by learning how to use laziness and performance
    issues cleared up by using strictness.<br>
    <br>
    Also interesting is that in all my interviews, GHC performance was
    never raised. No one said "I have to drop into C to solve that
    performance problem." <br>
    <br>
    Gregg<br>
    <br>
    On 5/16/2012 1:44 PM, Kevin Charter wrote:
    <blockquote
cite="mid:CAMLmkHQ4C9km+Ewub3jY1qREOzfoEBqPJhJpSVcS+_VCzoO-=Q@mail.gmail.com"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html;
        charset=ISO-8859-1">
      On Wed, May 16, 2012 at 8:40 AM, Gregg Lebovitz <span>&lt;<a
          moz-do-not-send="true" href="mailto:glebovitz@gmail.com">glebovitz@gmail.com</a>&gt;</span>
      wrote:<br>
      <div>
        <blockquote>
          1) Does Haskell and its libraries need performance
          improvements? &nbsp;Probably yes. Some of the performance issues
          seem to be related to the way the language is implemented and
          others by how it is defined. Developers really do run into
          performance issues with Haskell and either learn to work
          around the issue or try to fix the offending implementation.
          The wiki performance page gives insight into some of the
          performance issues and how address them.<br>
        </blockquote>
        <div><br>
        </div>
        <div>I think there is a closely-related issue: that you'll need
          to learn how to debug subtle performance problems <i>early</i>
          in your Haskell programming career. In particular</div>
        <div><br>
        </div>
        <div>
          <ul>
            <li>you will have space leaks and related performance
              problems in naively-written programs</li>
            <li>you will consequently need to learn how to use
              strictness annotations and other related language
              features, and how to use the profiler to determine where
              they're needed</li>
          </ul>
          <div>For example, imagine you're new to the language, and as
            an exercise decide to write a program that counts the
            characters on standard input and writes the count to
            standard output. A naive program in, say, Python will
            probably use constant space and be fairly fast. A naive
            program in Haskell stands a good chance of having a space
            leak, building a long chain of thunks that isn't forced
            until it needs to write the final answer. &nbsp;On small inputs,
            you won't notice. The nasty surprise comes when your
            co-worker says "cool, let's run it on this 100 MB log file!"
            and your program dies a horrible death. If your friend is a
            sceptic, she'll arch an eyebrow and secretly think your
            program -- and Haskell -- are a bit lame.</div>
        </div>
        <div><br>
        </div>
        <div>The example is contrived, but it's a very common task to
          consume some big stream of input and produce a much smaller
          summary of it. I think it's fair to say that you have to be a
          slightly sophisticated Haskell programmer to do those kinds of
          things correctly, at least compared to more mainstream
          languages.</div>
        <div><br>
        </div>
        <div>My experience is that this is perhaps the most important
          &nbsp;'problem' with Haskell performance. Not so much that it's
          typically two or three or ten times slower than language X,
          but that it's easy to have a bad experience <i>early on</i>,
          one that seems inconsistent with the language shoot-out and
          other performance comparisons.</div>
        <div><br>
        </div>
        <div>Kevin</div>
        <div>--&nbsp;</div>
      </div>
      Kevin Charter<br>
      <a moz-do-not-send="true" href="mailto:kevin.charter@acm.org">kevin.charter@acm.org</a><br>
    </blockquote>
  </body>
</html>