Patent ID: 8910135

Claim:
A method for compiling source code comprising: in a compiler, identifying a structure array, having a plurality of array elements, each array element being a structure with a plurality of fields; and performing structure instance interleaving on the structure array by permuting access to the fields of the structure without altering a physical layout of the structure array; and generating compiled code including the permuted access to fields of the structure; wherein generating the compiled code including the permuted access includes, creating internal pointers in the compiler to track m locations of m fields in each of the structures, where m is an integer corresponding to a number of fields in the structure, by rewriting array[i].field_j, where j represents a jth field of an ith array element of the structure array, to ptr_j[i], where ptr_j[i] is one of the internal pointers pointing to the jth field of the ith array element.