Class SpeedTest

  • Direct Known Subclasses:
    MatrixSpeedTest

    public class SpeedTest
    extends java.lang.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 Detail

      • num_itts

        public int num_itts
      • num_warmup

        public int num_warmup
      • num_vals

        public int num_vals
      • nDeriv

        public int nDeriv
      • totalTimes

        protected long[] totalTimes
    • Constructor Detail

    • Method Detail

      • init

        public void init()
      • fini

        public void fini()
      • doAll

        public void doAll​(java.lang.String eqn,
                          java.lang.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​(java.lang.String[] eqns,
                          java.lang.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 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​(java.lang.String[] args)
        Main method, executes all speed tests.
        Parameters:
        args -