> The profiler
is certainly useful (and much better with GHC 7.4)<br><br>What are the improvements in that matter? (I just noticed that some GHC flags wrt profiling have been renamed)<br><br><div class="gmail_quote">2012/5/16 Ben Gamari <span dir="ltr">&lt;<a href="mailto:bgamari.foss@gmail.com" target="_blank">bgamari.foss@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Kevin Charter &lt;<a href="mailto:kcharter@gmail.com">kcharter@gmail.com</a>&gt; writes:<br>
<br>
snip<br>
<div class="im">&gt; For example, imagine you&#39;re new to the language, and as an exercise decide<br>
&gt; to write a program that counts the characters on standard input and writes<br>
&gt; the count to standard output. A naive program in, say, Python will probably<br>
&gt; use constant space and be fairly fast. A naive program in Haskell stands a<br>
&gt; good chance of having a space leak, building a long chain of thunks that<br>
&gt; isn&#39;t forced until it needs to write the final answer.  On small inputs,<br>
&gt; you won&#39;t notice. The nasty surprise comes when your co-worker says &quot;cool,<br>
&gt; let&#39;s run it on this 100 MB log file!&quot; and your program dies a horrible<br>
&gt; death. If your friend is a sceptic, she&#39;ll arch an eyebrow and secretly<br>
&gt; think your program -- and Haskell -- are a bit lame.<br>
&gt;<br>
</div>I, for one, can say that my initial impressions of Haskell were quite<br>
scarred by exactly this issue. Being in experimental physics, I often<br>
find myself writing data analysis code doing relatively simple<br>
manipulations on large(ish) data sets. My first attempt at tackling a<br>
problem in Haskell took nearly three days to get running with reasonable<br>
performance. I can only thank the wonderful folks in #haskell profusely<br>
for all of their help getting through that period. That being said, it<br>
was quite frustrating at the time and I often wondered how I could<br>
tackle a reasonably large project if I couldn&#39;t solve even a simple<br>
problem with halfway decent performance. If it weren&#39;t for #haskell, I<br>
probably would have given up on Haskell right then and there, much to my<br>
deficit.<br>
<br>
While things have gotten easier, even now, nearly a year after writing<br>
my first line of Haskell, I still occassionally find a performance<br>
issue^H^H^H^H surprise. I&#39;m honestly not really sure what technical<br>
measures could be taken to ease this learning curve. The amazing<br>
community helps quite a bit but I feel that this may not be a<br>
sustainable approach if Haskell gains greater acceptance. The profiler<br>
is certainly useful (and much better with GHC 7.4), but there are still<br>
cases where the performance hit incurred by the profiling<br>
instrumentation precludes this route of investigation without time<br>
consuming guessing at how to pare down my test case. It&#39;s certainly not<br>
an easy problem.<br>
<br>
Cheers,<br>
<br>
- Ben<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>