Duplicate :
|
|
Relates :
|
|
Relates :
|
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.
|