I recently benchmarked a 2D array, a flat array and an array of arrays and
got the following performance results for LU decomposition:
2D array: 147 MFLOPS
Flat array: 340 MFLOPS
Array of arrays: 419 MFLOPS
However, I am not sure this is applicable to other algorithms. Does anyone
have any other data on this?
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
The results seems to match what would be expected.
Array of array is more flexible and need to support
non rectangular data - that obvious cost something.
By using 2D array instead of explicit calculation of
index into a 1D array you leave the indexing to the
compiler, which should enable it to better optimize.
Arne