Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  Memory usage prediction (Emanuel Koczwara)
   2. Re:  Memory usage prediction (Patrick Mylund Nielsen)
   3. Re:  Memory usage prediction (Emanuel Koczwara)
   4. Re:  Memory usage prediction (Patrick Mylund Nielsen)


----------------------------------------------------------------------

Message: 1
Date: Wed, 03 Jul 2013 21:14:21 +0200
From: Emanuel Koczwara <[email protected]>
Subject: [Haskell-beginners] Memory usage prediction
To: [email protected]
Message-ID: <1372878861.29656.7.camel@emanuel-laptop>
Content-Type: text/plain; charset="utf-8"

Hi,

  Where can I find some informations abut memory usage prediction? In C
(or C++) while I write code I can predict how much stack space will be
used, how much heap space will be used, I can count instructions. I want
to see all these things while I'm looking at my code. Is it possible in
Haskell?

Best regards,
Emanuel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5185 bytes
Desc: not available
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130703/0169c191/attachment-0001.bin>

------------------------------

Message: 2
Date: Wed, 3 Jul 2013 15:20:21 -0400
From: Patrick Mylund Nielsen <[email protected]>
Subject: Re: [Haskell-beginners] Memory usage prediction
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID:
        <CAEw2jfz4sd56p4Xxa_-VMdPZfg7azHWuhWPD=6z8lhsamuh...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The short answer is no. This is Haskell's biggest weakness: it's difficult
to predict space usage.

The longer answer is "kind of" -- you can't exactly intuit it, but the
profiler is easy to use:

http://book.realworldhaskell.org/read/profiling-and-optimization.html
http://www.haskell.org/ghc/docs/7.6.2/html/users_guide/prof-heap.html

The only caveat is you have to reinstall your libraries with profiling
enabled:
http://stackoverflow.com/questions/1704421/cabal-not-installing-dependencies-when-needing-profiling-libraries

(If I've already installed some packages, usually I take the quick and
dirty route and just set library-profiling to True, delete ~/.ghc to clear
the package list, then install my package.)


On Wed, Jul 3, 2013 at 3:14 PM, Emanuel Koczwara
<[email protected]>wrote:

> Hi,
>
>   Where can I find some informations abut memory usage prediction? In C
> (or C++) while I write code I can predict how much stack space will be
> used, how much heap space will be used, I can count instructions. I want
> to see all these things while I'm looking at my code. Is it possible in
> Haskell?
>
> Best regards,
> Emanuel
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130703/c786f040/attachment-0001.htm>

------------------------------

Message: 3
Date: Wed, 03 Jul 2013 21:31:33 +0200
From: Emanuel Koczwara <[email protected]>
Subject: Re: [Haskell-beginners] Memory usage prediction
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID: <1372879893.29656.14.camel@emanuel-laptop>
Content-Type: text/plain; charset="utf-8"

Hi Patrick,

Dnia 2013-07-03, ?ro o godzinie 15:20 -0400, Patrick Mylund Nielsen
pisze: 
> The short answer is no. This is Haskell's biggest weakness: it's
> difficult to predict space usage.
> 
> 
> The longer answer is "kind of" -- you can't exactly intuit it, but the
> profiler is easy to use:
> 
> 
> http://book.realworldhaskell.org/read/profiling-and-optimization.html
> 
> http://www.haskell.org/ghc/docs/7.6.2/html/users_guide/prof-heap.html
> 
> 
> 
> The only caveat is you have to reinstall your libraries with profiling
> enabled: 
> http://stackoverflow.com/questions/1704421/cabal-not-installing-dependencies-when-needing-profiling-libraries
> 
> 
> (If I've already installed some packages, usually I take the quick and
> dirty route and just set library-profiling to True, delete ~/.ghc to
> clear the package list, then install my package.)
> 

  Thank you for such a quick response. I know all that profiling
'stuff'. So, I will put it this way: is there a chance, that I will be
able to predict performance after some time of profiling my code?

Best regards,
Emanuel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5185 bytes
Desc: not available
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130703/2401e409/attachment-0001.bin>

------------------------------

Message: 4
Date: Wed, 3 Jul 2013 15:36:16 -0400
From: Patrick Mylund Nielsen <[email protected]>
Subject: Re: [Haskell-beginners] Memory usage prediction
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID:
        <CAEw2jfxboXWDj0=YZL50T_mxtUKJ=u7cEWbQEFvP3=eq-dz...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I would say "yes". I haven't had any big problems with space leaks that I
couldn't identify via the profiler, then fix.

I certainly wouldn't look at another language instead of Haskell for this
one reason, unless you really need a specific arena size, and you know
exactly what you want where, in which case you're probably writing an
application that's better suited by a language without a garbage collector,
anyway.


On Wed, Jul 3, 2013 at 3:31 PM, Emanuel Koczwara
<[email protected]>wrote:

> Hi Patrick,
>
> Dnia 2013-07-03, ?ro o godzinie 15:20 -0400, Patrick Mylund Nielsen
> pisze:
> > The short answer is no. This is Haskell's biggest weakness: it's
> > difficult to predict space usage.
> >
> >
> > The longer answer is "kind of" -- you can't exactly intuit it, but the
> > profiler is easy to use:
> >
> >
> > http://book.realworldhaskell.org/read/profiling-and-optimization.html
> >
> > http://www.haskell.org/ghc/docs/7.6.2/html/users_guide/prof-heap.html
> >
> >
> >
> > The only caveat is you have to reinstall your libraries with profiling
> > enabled:
> http://stackoverflow.com/questions/1704421/cabal-not-installing-dependencies-when-needing-profiling-libraries
> >
> >
> > (If I've already installed some packages, usually I take the quick and
> > dirty route and just set library-profiling to True, delete ~/.ghc to
> > clear the package list, then install my package.)
> >
>
>   Thank you for such a quick response. I know all that profiling
> 'stuff'. So, I will put it this way: is there a chance, that I will be
> able to predict performance after some time of profiling my code?
>
> Best regards,
> Emanuel
>
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130703/e3cca391/attachment.htm>

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 61, Issue 5
****************************************

Reply via email to