Package com.singularsys.jepexamples.diagnostics

# Class SpeedTest

java.lang.Object
com.singularsys.jepexamples.diagnostics.SpeedTest

public class SpeedTest extends Object
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 Classes
  Modifier and Type
  Class
  Description
  `static class`
  `SpeedTest.BDConfig`
  Configuration using the BDConfig
  `static class`
  `SpeedTest.EvaluationConfig`
  Basic class to set the evaluation context
  `static class`
  `SpeedTest.JepConfig`
  Standard Jep configuration (with FastEvaluator)
  `static class`
  `SpeedTest.JepConfig3_4`
  Standard Jep configuration (with Jep 3.4's FastEvaluator)
  `static class`
  `SpeedTest.JepConfig3_5`
  Standard Jep configuration (with Jep 3.5's FastEvaluator)
  `static class`
  `SpeedTest.JepConfig3_5NC`
  Standard Jep configuration (with Jep 3.5's FastEvaluator and no checks)
  `static class`
  `SpeedTest.JepConfigNoChecks`
  Standard Jep configuration (with FastEvaluator)
  `static class`
  `SpeedTest.OldConfig`
  Configuration using the StandardEvaluator
  `static class`
  `SpeedTest.Outputter`
  Different output methods
  `static class`
  `SpeedTest.PostfixConfig`
  Configuration using the RealEvaluator
  `static class`
  `SpeedTest.RatioOutputter`
  Print detailed ratios for each run.
  `static class`
  `SpeedTest.RealConfig`
  Configuration using the RealEvaluator
  `static class`
  `SpeedTest.TabOutputter`
  Print output tab separated.
  `static class`
  `SpeedTest.ThreadSafeConfig`
  Configuration using the RealEvaluator
  `static class`
  `SpeedTest.UncheckedConfig`
  Configuration using the `UncheckedEvaluator`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final List<SpeedTest.EvaluationConfig>`
  `configs`
  `final int`
  `nDeriv`
  `int`
  `num_itts`
  `final int`
  `num_vals`
  `final int`
  `num_warmup`
  `protected final SpeedTest.Outputter`
  `outputter`
  `protected long[]`
  `totalTimes`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SpeedTest(SpeedTest.Outputter outputter)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addConfig(SpeedTest.EvaluationConfig config)`
  Adds a new EvaluationConfig to be run for comparison.
  `void`
  `doAll(String[] eqns, String[] varNames)`
  Run speed comparison for a set of equations.
  `void`
  `doAll(String eqn, String[] varNames)`
  Run speed comparison for a single equation.
  `void`
  `fini()`
  `void`
  `init()`
  `static void`
  `main(String[] args)`
  Main method, executes all speed tests.
  `static void`
  `runTests(SpeedTest st)`
  A standard set of tests.
  `static void`
  `runTests2(SpeedTest st)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### num_itts

    public int num_itts

  - ### num_warmup

    public final int num_warmup
    See Also:
      - Constant Field Values

  - ### num_vals

    public final int num_vals
    See Also:
      - Constant Field Values

  - ### nDeriv

    public final int nDeriv
    See Also:
      - Constant Field Values

  - ### configs

    public final List<SpeedTest.EvaluationConfig> configs

  - ### outputter

    protected final SpeedTest.Outputter outputter

  - ### totalTimes

    protected long[] totalTimes

- ## Constructor Details

  - ### SpeedTest

    public SpeedTest(SpeedTest.Outputter outputter)
    Parameters:
      `outputter` -

- ## Method Details

  - ### init

    public void init()

  - ### fini

    public void fini()

  - ### doAll

    public void doAll(String eqn, String[] varNames)
    Run speed comparison for a single equation.
    Parameters:
      `eqn` - The equation to test
      `varNames` - an array of variable names which will be set to random values.

  - ### doAll

    public void doAll(String[] eqns, String[] varNames)
    Run speed comparison for a set of equations.
    Parameters:
      `eqns` -
      `varNames` -

  - ### addConfig

    public void addConfig(SpeedTest.EvaluationConfig config)
    Adds a new EvaluationConfig to be run for comparison.
    Parameters:
      `config` -

  - ### runTests2

    public static void runTests2(SpeedTest st)

  - ### runTests

    public static void runTests(SpeedTest st)
    A standard set of tests.
    Parameters:
      `st` -

  - ### main

    public static void main(String[] args)
    Main method, executes all speed tests.
    Parameters:
      `args` -