Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-1302

Many "case"s trigger slowdown on ssa_opt_dead

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 22.0
    • Fix Version/s: 24.0
    • Component/s: compiler
    • Labels:
      None

      Description

      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!

        Attachments

          Activity

            People

            Assignee:
            bjorn Björn Gustavsson
            Reporter:
            josevalim José Valim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: