benchmarks
benchmarks copied to clipboard
enh: more realistic benchmark
I think it is vital that benchmarks are realistic. Using fixed size arrays is not realistic in my opinion.
This PR does many things:
- benchmarks should not rely on convergence, rather a fixed number of iterations is more appropriate, otherwise timings are irrelevant
- The problem of inconsistent iterations between the C and Fortran versions is fixed. It was an indexing error when calculating the cell for the
rhoarr
array (C is 0-based, F is 1-based). So they now run the same number of iterations, regardless ofM
. - Moved timings about to make them more comparable.
- Ensured that all examples now use allocate/malloc
- Calls in C and F code are much more similar
For running benchmarks it is vital that M
is so large that the 2D array goes beyond the L3 cache to match realistic cases.