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

LinearScan::is_sorted significantly slows down fastdebug builds' performance

    XMLWordPrintable

Details

    • b110
    • generic
    • generic

    Description

      LinearScan::is_sorted used in fastdebug builds in order to verify that C1's interval's array is actually sorted and that both sorted and unsorted arrays contain same elements:

      http://hg.openjdk.java.net/jdk8u/hs-dev/hotspot/file/9c8dbbd8694a/src/share/vm/c1/c1_LinearScan.cpp#l1451

      Unfortunately it significantly slows down performance of fastdebug builds and regularly cause test failures due to exceeded timeouts.

      I believe that performance of that method could be enhanced.
      For instance, we can just check that lengths of both sorted and unsorted arrays are same and then just run over elements of unsorted array and check that each interval is presented in sorted array.
      Binary search could be used to find interval from unsorted array in sorted array then.

      Attachments

        Issue Links

          Activity

            People

              fzhinkin Filipp Zhinkin
              fzhinkin Filipp Zhinkin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: