Last week I posted an in depth answer on StackOverflow.com about the memory allocation difference in Delphi and Fortran, or more accurately in two different kinds of languages.
You have:
- column major order (not only used in Fortran and other science centric languages, but also in the shading languages GLSL and HLSL that can be used in FireMonkey)
- row major order (used in most other languages, for instance Delphi, C, etc)
A very important aspect is the order of for optimized loops. For column major order, the optimum is inside out (as the inner arrays/records are in consecutive memory locations), but for row major order, it is the exact inverse.
One of the consequences is that in Fortran it is a very fast operation to pass an array of inner fields as parameter to a method.
This is what I wrote: Read the rest of this entry »