<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 04/07/2015 03:44 PM, José Valim
wrote:<br>
</div>
<blockquote
cite="mid:CAGnRm4J3cz1zbwUmV+sDCzR2MEKb5iy4QFOjzg5fELO+zCVr1Q@mail.gmail.com"
type="cite">
<div dir="ltr">I have first noticed this issue when compiling
Elixir's grammar. Compiling yrl -> erl -> beam is about
20% slower in Erlang 18.0-rc1. The results are shown below:
<div>
<div>
<div class="gmail_signature">
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://gist.github.com/josevalim/ab08341512ba875fb4a7">https://gist.github.com/josevalim/ab08341512ba875fb4a7</a><br>
</div>
<div><br>
</div>
<div>To further verify the performance issues, I have
decided to run Elixir's test suite with 18.0 and 17.4.
Elixir test suite defines a lot of modules dynamically
when loading so that would be a good test. The results
are here:</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://gist.github.com/josevalim/895e2365d5ae517b1c8a">https://gist.github.com/josevalim/895e2365d5ae517b1c8a</a><br>
</div>
<div><br>
</div>
<div>It is interesting that the load/compile times are
indeed higher in 18.0 but the test suite is also taking
*longer*. This may imply it is not the compiler that is
slower but Erlang itself. I have run the test suite of
other projects in different Erlang versions (same Elixir
version though) and seen similar slow down. About a 20%
slow down on Erlang 18.0-rc1 overall.</div>
<div><br>
</div>
<div>Unfortunately, I don't have any idea why this is
happening. I have asked others to compile the same .yrl
file and they have seen similar performance hit. It is
easy to reproduce it. Download the elixir_parser.yrl
file:</div>
<div><br>
</div>
<div>
<div><a moz-do-not-send="true"
href="https://github.com/elixir-lang/elixir/blob/v1.0/lib/elixir/src/elixir_parser.yrl">https://github.com/elixir-lang/elixir/blob/v1.0/lib/elixir/src/elixir_parser.yrl</a></div>
</div>
<div><br>
</div>
<div>And run both commands:</div>
<div><br>
</div>
<div> $ time erlc +time elixir_parser.yrl</div>
<div> $ time erlc +time elixir_parser.erl<br>
</div>
<div><br>
</div>
<div>I hope by posting this report others can be alert to
similar issues in their projects.</div>
<div><br>
</div>
<div>Thoughts?</div>
<div><br>
</div>
<div><span style="font-size:13px">
<div><span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b>José
Valim</b></span></div>
<div><span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">
<div><span
style="font-family:verdana,sans-serif;font-size:x-small"><a
moz-do-not-send="true"
href="http://www.plataformatec.com.br/"
style="color:rgb(42,93,176)" target="_blank">www.plataformatec.com.br</a></span></div>
<div><span
style="font-family:verdana,sans-serif;font-size:x-small">Skype:
jv.ptec</span></div>
<div><span
style="font-family:verdana,sans-serif;font-size:x-small">Founder
and Lead Developer</span></div>
</span></div>
</span></div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-bugs mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-bugs">http://erlang.org/mailman/listinfo/erlang-bugs</a>
</pre>
</blockquote>
<tt>I have used rebar2 (using the tag </tt>"2.1.0-pre") to compile
CloudI with 18.0-rc1 and have had a few builds go extremely slow, to
the point I needed to kill the build and restart it (slow only
during the rebar2 usage). This problem appears to be transient and
I haven't been able to reproduce it consistently, but I assume it is
related to how escript is running. I have other escripts that use
"-mode(compile)." which don't have this problem.<br>
<br>
I haven't done enough runtime usage of 18.0-rc1 to really determine
that this is or isn't related to the Erlang compilation, but it
makes more sense to me that it is a transient slowness with the
Erlang VM itself, for reasons unknown.<br>
</body>
</html>