import java.util.stream.IntStream; svoid benchDescendingIntArraySortingMethods(int n default 1000000) { int[] a = arrayOfRandomInts(n, predictableRandomizer()); print("Stream negation method"); int[] sorted = benchFor5(-> IntStream.of(a).map(i -> ~i).sorted().map(i -> ~i).toArray()); print("Negation method"); int[] sorted2 = benchFor5(-> sortIntArrayInPlaceDesc_crazyNegationAlgorithm(cloneIntArray(a)); print("Reversal method"); int[] sorted3 = benchFor5(-> sortIntArrayInPlaceDesc(cloneIntArray(a)); printStruct(takeFirst(10, sorted)); printStruct(takeFirst(10, sorted2)); printStruct(takeFirst(10, sorted3)); }