com.carrotsearch.hppc.caliper
Class BenchmarkCollectionsSort

java.lang.Object
  extended by com.google.caliper.api.Benchmark
      extended by com.google.caliper.SimpleBenchmark
          extended by com.carrotsearch.hppc.caliper.BenchmarkCollectionsSort
All Implemented Interfaces:
com.google.caliper.Benchmark

public class BenchmarkCollectionsSort
extends com.google.caliper.SimpleBenchmark

Benchmark Collections.sort(java.util.List), in particular for differences in the new JDK 1.7 (TimSort). The point of this benchmark is to get the order of elements (their indexes), not an array or collection of sorted elements (!).


Field Summary
 int size
           
 
Constructor Summary
BenchmarkCollectionsSort()
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  void setUp()
           
 int timeIndirectMergeSort(int reps)
           
 int timeLegacySort(int reps)
           
 int timeNewSort(int reps)
           
 
Methods inherited from class com.google.caliper.SimpleBenchmark
bytesToUnits, createBenchmark, getInstanceUnitNames, getMemoryUnitNames, getTimeUnitNames, instancesToUnits, nanosToUnits, normalizeScenario, parameterNames, parameterValues, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

public int size
Constructor Detail

BenchmarkCollectionsSort

public BenchmarkCollectionsSort()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class com.google.caliper.SimpleBenchmark
Throws:
java.lang.Exception

timeIndirectMergeSort

public int timeIndirectMergeSort(int reps)

timeLegacySort

public int timeLegacySort(int reps)

timeNewSort

public int timeNewSort(int reps)

main

public static void main(java.lang.String[] args)


Copyright © 2011 Carrot Search s.c.. All Rights Reserved.