You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original reporter: josevalim
Affected version: OTP-22.0
Fixed in version: OTP-24.0
Component: compiler
Migrated from: https://bugs.erlang.org/browse/ERL-1302
Someone reported a scenario where compiling some code got slower from Erlang/OTP 21 to Erlang/OTP 23. I have isolated the code to the following Erlang file:
[https://gist.github.com/josevalim/2c175678a0f85568eb001dcb97024ef5]
In my machine, it is about 7x faster to compile on Erlang/OTP 21 compared to Erlang/OTP 22. It is a bit faster on Erlang/OTP 23 (and even faster in master), but it is still 4x to 5x slower than what it was before.
Using the +time flag, we can see the majority of the time is spent on "ssa_opt_dead". I am not sure if there is something that could be done to speed it up but I thought I would open up a report in case it does reveal some pathological case. Feel free to close otherwise. :)
Thank you!
The text was updated successfully, but these errors were encountered:
If you want more data samples to play with, here is another gist also generated by Elixir's template engine compiled down to Erlang: [https://gist.github.com/josevalim/acac154996e1e61058f367a5b3a161aa]
This one puts more load on the live_intervals pass rather than ssa dead. I have attached some profiling results to the gist. It takes roughly 24s on my machine.
Curiously, this also triggered a slow down on Elixir passes too. In our case, we were generating really long variable chains where `var1 -> var2 -> var3 -> varN -> integer`. In our case we could fix it by pointing to the first variable, so it become `var1 -> integer`, `var2 -> var1 -> integer`, `var3 -> var1 -> integer`, etc.
Original reporter:
josevalim
Affected version:
OTP-22.0
Fixed in version:
OTP-24.0
Component:
compiler
Migrated from: https://bugs.erlang.org/browse/ERL-1302
The text was updated successfully, but these errors were encountered: