<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">The kind of comparison you want is fraught with difficulty.</div><div class="gmail_default" style="font-family:monospace,monospace">There are, for example, several different Haskell compilers.</div><div class="gmail_default" style="font-family:monospace,monospace">GHC, of course, is *the* Haskell compiler, but UHC is still</div><div class="gmail_default" style="font-family:monospace,monospace">a contender, and LHC is coming along.  If you are happy with</div><div class="gmail_default" style="font-family:monospace,monospace">Haskell 98, JHC is still around.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">You cannot actually benchmark *Haskell*, only a particular</div><div class="gmail_default" style="font-family:monospace,monospace">Haskell compiler version with certain options on a particular</div><div class="gmail_default" style="font-family:monospace,monospace">(kind of) machine running a particular operating system and</div><div class="gmail_default" style="font-family:monospace,monospace">libraries.  So let's stick with GHC.  Depending on exactly</div><div class="gmail_default" style="font-family:monospace,monospace">what you have, GHC has *at least* two different back ends.</div><div class="gmail_default" style="font-family:monospace,monospace">It also has more optimisation options than any sane</div><div class="gmail_default" style="font-family:monospace,monospace">programmer wants to think about.  The effects of something</div><div class="gmail_default" style="font-family:monospace,monospace">like -ffull-laziness can be anything between very welcome and</div><div class="gmail_default" style="font-family:monospace,monospace">spectacularly unhelpful.  Understanding performance in a non-</div><div class="gmail_default" style="font-family:monospace,monospace">strict language is tricky, and as a tip for beginners, see if</div><div class="gmail_default" style="font-family:monospace,monospace">you understand the difference between foldl and foldl' .</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">And of course, GHC is actively maintained.  I'm using Ubuntu</div><div class="gmail_default" style="font-family:monospace,monospace">Linux 18.04 (Bionic Beaver) and the latest version of GHC</div><div class="gmail_default" style="font-family:monospace,monospace">available from the Ubuntu repository is 8.0.2.  The current</div><div class="gmail_default" style="font-family:monospace,monospace">stable release is 8.4.3.  The current release in beta is</div><div class="gmail_default" style="font-family:monospace,monospace">8.6.1.  There have been four releases of GHC so far this year.</div><div class="gmail_default" style="font-family:monospace,monospace">Do they all have the same performance for all programs?</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Erlang is also very actively maintained, and also has at</div><div class="gmail_default" style="font-family:monospace,monospace">least two back ends (BEAM and HiPE).</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">How big are the 10 programs and how long do you expect them</div><div class="gmail_default" style="font-family:monospace,monospace">to run?</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 25 Sep 2018 at 16:25, Awsaf Rahman <<a href="mailto:awsafrahman1704@gmail.com">awsafrahman1704@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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. <br></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Sep 23, 2018 at 8:05 PM Paul Peregud <<a href="mailto:paulperegud@gmail.com" target="_blank">paulperegud@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>To profile CPU time, you can use fprof (part of OTP distribution).<br></div><div><br></div><div>Why would you want to profile CPU usage during compilation? Are you planning working on Erlang compilator (erlc)?<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Sep 23, 2018 at 12:12 AM Awsaf Rahman <<a href="mailto:awsafrahman1704@gmail.com" target="_blank">awsafrahman1704@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br>I want to profile a few Erlang programs I wrote. Basically, I want to find out the following: </div><div>1) CPU and memory usage during compilation</div><div>2) CPU and memory usage during execution</div><div><br></div><div>Is there anyway I can do this? </div><div><br></div><div>Kind regards</div><div>Awsaf</div></div>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="m_-2353528478653623162m_-2630241764259418436gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Paul Peregud<br>+48602112091</div>
</blockquote></div>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>