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.

  • Field Details

  • Constructor Details

  • 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 -