[erlang-questions] Memory usage

Richard O'Keefe raoknz@REDACTED
Tue Sep 25 13:35:42 CEST 2018


The kind of comparison you want is fraught with difficulty.
There are, for example, several different Haskell compilers.
GHC, of course, is *the* Haskell compiler, but UHC is still
a contender, and LHC is coming along.  If you are happy with
Haskell 98, JHC is still around.

You cannot actually benchmark *Haskell*, only a particular
Haskell compiler version with certain options on a particular
(kind of) machine running a particular operating system and
libraries.  So let's stick with GHC.  Depending on exactly
what you have, GHC has *at least* two different back ends.
It also has more optimisation options than any sane
programmer wants to think about.  The effects of something
like -ffull-laziness can be anything between very welcome and
spectacularly unhelpful.  Understanding performance in a non-
strict language is tricky, and as a tip for beginners, see if
you understand the difference between foldl and foldl' .

And of course, GHC is actively maintained.  I'm using Ubuntu
Linux 18.04 (Bionic Beaver) and the latest version of GHC
available from the Ubuntu repository is 8.0.2.  The current
stable release is 8.4.3.  The current release in beta is
8.6.1.  There have been four releases of GHC so far this year.
Do they all have the same performance for all programs?

Erlang is also very actively maintained, and also has at
least two back ends (BEAM and HiPE).

How big are the 10 programs and how long do you expect them
to run?


On Tue, 25 Sep 2018 at 16:25, Awsaf Rahman <awsafrahman1704@REDACTED>
wrote:

> I am trying to compare Erlang and Haskell based on compile time, execution
> time, memory usage and cpu usage for a set of 10 programs. I am not fluent
> in either of them and this is my first time trying benchmarking.
>
> On Sun, Sep 23, 2018 at 8:05 PM Paul Peregud <paulperegud@REDACTED>
> wrote:
>
>> To profile CPU time, you can use fprof (part of OTP distribution).
>>
>> Why would you want to profile CPU usage during compilation? Are you
>> planning working on Erlang compilator (erlc)?
>>
>> On Sun, Sep 23, 2018 at 12:12 AM Awsaf Rahman <awsafrahman1704@REDACTED>
>> wrote:
>>
>>> Hello all,
>>>
>>> I want to profile a few Erlang programs I wrote. Basically, I want to
>>> find out the following:
>>> 1) CPU and memory usage during compilation
>>> 2) CPU and memory usage during execution
>>>
>>> Is there anyway I can do this?
>>>
>>> Kind regards
>>> Awsaf
>>> _______________________________________________
>>> erlang-questions mailing list
>>> erlang-questions@REDACTED
>>> http://erlang.org/mailman/listinfo/erlang-questions
>>>
>>
>>
>> --
>> Best regards,
>> Paul Peregud
>> +48602112091
>>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180925/23e69896/attachment.htm>


More information about the erlang-questions mailing list