I need to process about 500,000 data points, each of which consists of 4 decimal places. I would like to use an array of structures for this. Will it be much slower than using an array of arrays? It seems that memory will not be a problem, but there will be speed - it should be fast.
A quick code example of two options:
Option 1:
public struct Struct
{
public decimal A { get; set; }
public decimal B { get; set; }
public decimal C { get; set; }
public decimal D { get; set; }
}
Using:
private Struct[] data;
Option 2:
private decimal [][] data;
Also using the decimalcorrect data type to use? Data points are money ...
Thanks! Brian
source
share