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
Modifier and TypeClassDescriptionstatic class
Basic class to set the evaluation contextstatic class
Standard Jep configuration (with FastEvaluator)static class
Standard Jep configuration (with FastEvaluator)static class
static class
static class
Standard Jep configuration (with FastEvaluator)static class
Configuration using the StandardEvaluatorstatic class
Different output methodsstatic class
Configuration using the RealEvaluatorstatic class
Print detailed ratios for each run.static class
Configuration using the RealEvaluatorstatic class
Print output tab separated.static class
Configuration using the RealEvaluatorstatic class
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<SpeedTestComplex.EvaluationConfig>
int
int
final int
final int
protected final SpeedTestComplex.Outputter
protected long[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new EvaluationConfig to be run for comparison.void
Run speed comparison for a set of equations.void
Run speed comparison for a single equation.void
fini()
void
init()
static void
Main method, executes all speed tests.void
runTests()
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.
-