[Haskell-cafe] Example programs with ample use of deepseq?
Joachim Breitner
mail at joachim-breitner.de
Tue Jan 8 22:54:05 CET 2013
Hi,
Am Dienstag, den 08.01.2013, 13:01 -0800 schrieb Evan Laforge:
> > surprisingly, deepseq is not used as much as I thought.
> > http://packdeps.haskellers.com/reverse/deepseq lists a lot of packages,
> > but (after grepping through some of the code) most just define NFData
> > instances and/or use it in tests, but rarely in the „real“ code. For
> > some reason I expected it to be in more widespread use.
>
> I've been using deepseq quite a bit lately, but for the purpose of
> debugging space leaks. If, when I deepseq a big structure, the space
> leak goes away, I can then apply it to some subset. After much
> trial-and-error I can find something which is insufficiently strict.
> Ideally I can then strictify that one thing and stop using the
> deepseq. I wish there was a more efficient way to do this.
this is also a possible application of my approach, by providing a „I
want this data structure to be fully evaluated now, please tell me how
it currently looks, i.e. where in the data structure still thunks lie
hidden.“
Do you have a nice, striking example where using your approach (using
deepseq and comparing efficiency) you could make a difference, and where
a tool as described above would make the analysis much easier?
Thanks,
Joachim
--
Joachim Breitner
e-Mail: mail at joachim-breitner.de
Homepage: http://www.joachim-breitner.de
Jabber-ID: nomeata at joachim-breitner.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130108/6294b36d/attachment.pgp>
More information about the Haskell-Cafe
mailing list