<div dir="ltr">Thanks for reporting this issue!<div><br></div><div style>I introduced a new optimization in R16</div><div style>and failed to optimize it. I will fix it</div><div style>in the R16B01 release.</div><div style>
<br></div><div style>/Bjorn</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 12, 2013 at 4:39 PM, Magnus Müller <span dir="ltr"><<a href="mailto:mamuelle@informatik.hu-berlin.de" target="_blank">mamuelle@informatik.hu-berlin.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The following small module takes ~10s to compile with R16B (erl +V<br>
below). The code is distilled from indent/erlang_indent.erl in vimerl<br>
[1]. Diagnostics are fast (a small syntax error somewhere crashes the<br>
compilation immediately). The same module compiles quickly (<1s) with R15B.<br>
<br>
-------------------------------------------------<br>
-module(erlang_indent).<br>
<br>
-export([p/2]).<br>
<br>
-define(IS(T, C), (element(1, T) == C)).<br>
<br>
-record(state, {stack = []}).<br>
<br>
p(T1, #state{stack = [T2 | _]}) when ?IS(T2, a), ?IS(T1, b), ?IS(T1, c)<br>
-> ok; p(T, _) when ?IS(T, a1); ?IS(T, b1); ?IS(T, c1) -> ok;<br>
p(T, _) when ?IS(T, a2); ?IS(T, b2); ?IS(T, c2) -> ok;<br>
p(T, _) when ?IS(T, a) -> ok;<br>
p(T, _) when ?IS(T, a), (?IS(T, b) and ?IS(T, c)) -> ok;<br>
p(_, T) when ?IS(T, a) -> ok;<br>
p(_, T) when ?IS(T, b) -> ok;<br>
p(T, _) when ?IS(T, a) -> ok.<br>
-------------------------------------------------<br>
<br>
$ erl +V<br>
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 5.10.1<br>
<br>
<br>
The original file[2] in vimerl takes even longer to compile. Note that<br>
that [2] is actually an escript, but the error persists when<br>
it is converted to a module.<br>
<br>
<br>
[1] <a href="https://github.com/jimenezrick/vimerl" target="_blank">https://github.com/jimenezrick/vimerl</a><br>
[2] <a href="https://raw.github.com/jimenezrick/vimerl/master/indent/erlang_indent.erl" target="_blank">https://raw.github.com/jimenezrick/vimerl/master/indent/erlang_indent.erl</a><br>
_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Björn Gustavsson, Erlang/OTP, Ericsson AB
</div>