[erlang-bugs] Erlang 18.0-rc1 is behaving slower than 17.4 (and 17.5)

José Valim jose.valim@REDACTED
Wed Apr 8 00:44:18 CEST 2015


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:

https://gist.github.com/josevalim/ab08341512ba875fb4a7

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:

https://gist.github.com/josevalim/895e2365d5ae517b1c8a

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.

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:

https://github.com/elixir-lang/elixir/blob/v1.0/lib/elixir/src/elixir_parser.yrl

And run both commands:

    $ time erlc +time elixir_parser.yrl
    $ time erlc +time elixir_parser.erl

I hope by posting this report others can be alert to similar issues in
their projects.

Thoughts?

*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Lead Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150408/c8f17c18/attachment.htm>


More information about the erlang-bugs mailing list