Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8043608

Make equality tests inline better

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Resolved In Build:
      b17
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Avatar tests can spend up to 5% of their runtime comparing objects using == or != operator. With our current compilation techniques, a call to ScriptRuntime.equals() is only invoked when the arguments are objects - when we know they're numbers etc. those cases are caught by the compiler. Therefore, prioritizing object comparison and extracting other comparison into separate methods so the primary methods are smaller provides a performance benefit.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                attila Attila Szegedi
                Reporter:
                attila Attila Szegedi
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: