Java Codec Speed Tests

I created a speed test that has two modes: big observation mode and small observation mode. I want to compare the original implementation to the new ideas for using bulk reads.

Big Observation Mode

The first test runs for only 200 steps, but it passes 50 000 ints and doubles back and forth each time.

Original Timing

MS to run Episode Type 1 22843 (per step: 113.65 or 8 steps per second)

Replace Sending Ints and Doubles from Singles to Arrays (2x speedup)

MS to run Episode Type 1 10971 (per step: 54.58 18 or 18 steps per second)

Above + Reading as Arrays (no major improvement)

MS to run Episode Type 1 13097 (per step: 65.1592039800995)

Small Observation Mode

The second test runs for 5000 steps, but it passes only 5 ints and doubles back and forth each time.

Original Timing

MS to run Episode Type 2 3021 (per step: 0.60 or 1666 steps per second)

Replace Sending Ints and Doubles from Singles to Arrays (3x speedup)

MS to run Episode Type 2 1054 (per step: 0.21 or 4760 steps per second)

Above + Reading as Arrays (no major improvement)

MS to run Episode Type 2 1077 (per step: 0.21535692861427713)

Run with C/C++ Codec for Experiment and Agent (testing Env only)

I added this section because its a good benchmark to keep the agent and experiment part of the speed test in C, and only vary the experiment.

Big Observations

elapsed time in ms: 8033, per step is 39.965176 (25 steps per second)

Updated on Sept 23, 2008 with faster constructors, removed a superfluous copy of the whole structure.

elapsed time in ms: 6840, per step is 34.029850 (29 steps per second)

Small Observations

elapsed time in ms: 1018, per step is 0.203559 (5000 steps per second)

Updated on Sept 23, 2008 with faster constructors, removed a superfluous copy of the whole structure.

No improvement.