Class SpeedTestComplex
java.lang.Object
com.singularsys.jepexamples.diagnostics.SpeedTestComplex
Compares the speed of evaluation between different evaluation schemes.
The standard class compares BigDecimal, Jep (with default Fast evaluator),
the old StandardEvaluator, and RealEvaluator.
If you have some nice complicated examples, I'd love to hear about them to see if we can tune things up. - rich
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBasic class to set the evaluation contextstatic classStandard Jep configuration (with FastEvaluator)static classStandard Jep configuration (with FastEvaluator)static classstatic classstatic classStandard Jep configuration (with FastEvaluator)static classConfiguration using the StandardEvaluatorstatic classDifferent output methodsstatic classConfiguration using the RealEvaluatorstatic classPrint detailed ratios for each run.static classConfiguration using the RealEvaluatorstatic classPrint output tab separated.static classConfiguration using the RealEvaluatorstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<SpeedTestComplex.EvaluationConfig>intintfinal intfinal intprotected final SpeedTestComplex.Outputterprotected long[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new EvaluationConfig to be run for comparison.voidRun speed comparison for a set of equations.voidRun speed comparison for a single equation.voidfini()voidinit()static voidMain method, executes all speed tests.voidrunTests()A standard set of tests.
-
Field Details
-
num_itts
public int num_itts -
num_warmup
public final int num_warmup- See Also:
-
num_vals
public final int num_vals- See Also:
-
nDeriv
public int nDeriv -
configs
-
outputter
-
totalTimes
protected long[] totalTimes
-
-
Constructor Details
-
SpeedTestComplex
- Parameters:
outputter-
-
-
Method Details
-
init
public void init() -
fini
public void fini() -
doAll
Run speed comparison for a single equation.- Parameters:
eqn- The equation to testvarNames- an array of variable names which will be set to random values.
-
doAll
Run speed comparison for a set of equations.- Parameters:
eqns-varNames-
-
addConfig
Adds a new EvaluationConfig to be run for comparison.- Parameters:
config-
-
main
Main method, executes all speed tests. Arguments '-pause' causes the program to wait for keyboard input before running test, useful use in profilers. Or a number specifying number of iterations to run.- Parameters:
args- Can contain '-pause' or NUM
-
runTests
public void runTests()A standard set of tests.
-