> 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"><<a href="mailto:bgamari.foss@gmail.com" target="_blank">bgamari.foss@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Kevin Charter <<a href="mailto:kcharter@gmail.com">kcharter@gmail.com</a>> writes:<br>
<br>
snip<br>
<div class="im">> For example, imagine you're new to the language, and as an exercise decide<br>
> to write a program that counts the characters on standard input and writes<br>
> the count to standard output. A naive program in, say, Python will probably<br>
> use constant space and be fairly fast. A naive program in Haskell stands a<br>
> good chance of having a space leak, building a long chain of thunks that<br>
> isn't forced until it needs to write the final answer. On small inputs,<br>
> you won't notice. The nasty surprise comes when your co-worker says "cool,<br>
> let's run it on this 100 MB log file!" and your program dies a horrible<br>
> death. If your friend is a sceptic, she'll arch an eyebrow and secretly<br>
> think your program -- and Haskell -- are a bit lame.<br>
><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't solve even a simple<br>
problem with halfway decent performance. If it weren'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'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'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>