Fork me on GitHub

Benchmark: Basic Matrix Operations

Implement a basic matrix data structure providing addition and multiplication. Rules:

The benchmark is divided into three stages:

Benchmark aspects: Dynamic arrays, indexing, nested loops, code elegance of matrix implementations

Input

  1. Argument: Size N of the NxN matrix (allowing to pre-allocate required memory for the matrix; validation of CSV not necessary)
  2. Argument: Path of CSV (first matrix)
  3. Argument: Path of CSV (second matrix)

Note: The framework may pass the same path as both first and second matrix. This must not be exploited, i.e., each matrix should still be read individually.

Control Output

After writing the stage run times to STDOUT, the implementations should print:

Each bar corresponds to the run time of one particular stage. Use mouse-over to highlight a single stage for comparison. Only shows run times of the largest data size.

Run time: Total

All raw run times of individual runs for small (N = 100), medium (N = 300), and large (N = 500) problem sizes. Use mouse-over to see relative performance.

Run time: IO

All raw run times of individual runs for small (N = 100), medium (N = 300), and large (N = 500) problem sizes. Use mouse-over to see relative performance.

Run time: Add

All raw run times of individual runs for small (N = 100), medium (N = 300), and large (N = 500) problem sizes. Use mouse-over to see relative performance.

Run time: Mul

All raw run times of individual runs for small (N = 100), medium (N = 300), and large (N = 500) problem sizes. Use mouse-over to see relative performance.