The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

    • RT @ProperlyZuri: One of my favorite things at Reason is our continued coverage of “Florida’s Worst Cop.” Sgt. German Bosque—arrested 3 tim… 2 hours ago
    • RT @mljmljmlj: 1/ One of the most important libraries in the world is being called a pirate site & being sued for bankruptcy. I'm shocked… 2 hours ago
    • RT @SwiftOnSecurity: I have a friend who works at an org with their own TLD. Except they can’t use it because some of their network tools d… 2 hours ago
    • RT @ziyatong: yup. https://t.co/lBraJvOIJr 2 hours ago
    • RT @WIRED: It's safe to assume that any digital evidence that you were at or near a protest could be used against you. Here is how you can… 2 hours ago
  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,929 other followers

Archive for August 14th, 2012

Delphi/Fortran memory allocation difference: row/column major order makes a big difference. StackOverflow answer.

Posted by jpluimers on 2012/08/14

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 »

Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi for PHP, Delphi x64, Delphi XE, Delphi XE2, Development, Fortran, Software Development | 4 Comments »

 
%d bloggers like this: