Class SpeedTest
java.lang.Object
com.singularsys.jepexamples.diagnostics.SpeedTest
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
Command line arguments: -pause cause the program to wait for keyboard input
before running tests, can be useful for running in a debugger;
1000000 sets the number of iterations to used.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration using the BDConfigstatic 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<SpeedTest.EvaluationConfig>final intintfinal intfinal intprotected final SpeedTest.Outputterprotected long[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfig(SpeedTest.EvaluationConfig config) Adds 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.static voidA standard set of tests.static void
-
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 final int nDeriv- See Also:
-
configs
-
outputter
-
totalTimes
protected long[] totalTimes
-
-
Constructor Details
-
SpeedTest
- 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-
-
runTests2
-
runTests
A standard set of tests.- Parameters:
st-
-
main
Main method, executes all speed tests.- Parameters:
args-
-