examples
Class IntModBenchmark

java.lang.Object
  extended by com.google.caliper.api.Benchmark
      extended by com.google.caliper.SimpleBenchmark
          extended by examples.IntModBenchmark
All Implemented Interfaces:
com.google.caliper.Benchmark

public class IntModBenchmark
extends com.google.caliper.SimpleBenchmark

Measures several candidate implementations for mod().


Constructor Summary
IntModBenchmark()
           
 
Method Summary
static void main(String[] args)
           
 int timeConditional(int reps)
           
 int timeDoubleRemainder(int reps)
           
 int timeLeftShiftingMod(int reps)
           
 int timeRightShiftingMod(int reps)
           
 int timeWrongMod(int reps)
           
 
Methods inherited from class com.google.caliper.SimpleBenchmark
bytesToUnits, createBenchmark, getInstanceUnitNames, getMemoryUnitNames, getTimeUnitNames, instancesToUnits, nanosToUnits, normalizeScenario, parameterNames, parameterValues, setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntModBenchmark

public IntModBenchmark()
Method Detail

timeConditional

public int timeConditional(int reps)

timeDoubleRemainder

public int timeDoubleRemainder(int reps)

timeRightShiftingMod

public int timeRightShiftingMod(int reps)

timeLeftShiftingMod

public int timeLeftShiftingMod(int reps)

timeWrongMod

public int timeWrongMod(int reps)

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2009-2011 Google, Inc.. All Rights Reserved.