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
Modifier and TypeClassDescriptionstatic class
Configuration using the BDConfigstatic 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<SpeedTest.EvaluationConfig>
final int
int
final int
final int
protected final SpeedTest.Outputter
protected long[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfig
(SpeedTest.EvaluationConfig config) 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.static void
A 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
-
-