[fpc-devel] TSomeRecord of array[0..ConstCount-1];

Skybuck Flying skybuck2000 at hotmail.com
Tue Apr 23 17:33:41 CEST 2013


Hello,

Here is an idea how to speed up pascal programs by about 20%.

Currently pascal only supports:

array of structure;

However if structure of array was used this could give 20% additional performance.

the syntax for such a new feature could be:

structure of array;

So examples:

var
  vArrayOfStructure : array[0..1000] of TSomeRecord;
  vStructureOfArray : TSomeRecord of array[0..1000];

All the fields for TSomeRecord are then layed out in memory as if they were individual arrays.

This places the fields more beneficial for cache hits such is the idea.

Bye,
  Skybuck.






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20130423/98422c69/attachment.html>


More information about the fpc-devel mailing list