in reply to Need help on performance question

Hashes are great when you want to do fast lookups of data by key, but for inherently indexed datasets, they make very little sense at all, as they do not preserve order.

For matrix operations, an AoA makes much more sense. If pure speed is your criteria and each of your rows have the same number of elements (ditto the columns), then using a single dimension array and using math to convert your 2d indices to 1d indices might prove a little quicker.


Examine what is said, not who speaks.
1) When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states that something is impossible, he is very probably wrong.
2) The only way of discovering the limits of the possible is to venture a little way past them into the impossible
3) Any sufficiently advanced technology is indistinguishable from magic.
Arthur C. Clerk.