|
Hi,
I am using quantlib from C# (Swig generated wrapper) to calculate various statistics using the multiplestatistics class. I am loading 260 sequences of data (33 items in each sequence). The calculations preformed on the sequence seem to return in under a ms (performing covariance etc), but the loading of the data is taking around 250ms ( I am evaluating quantlib against other options, this is why the timing is significant).
To load the data, I am performing the following:
double []myarray= new double[33];
for (int i=0; i < 260 ; i++)
{
for (int l= 0; l<33; l++)
{
myarray[l]=PL[i,l];
}
ms.add(new DoubleVector(myarray));
}
where ms is an instance of a multiplestatistics class.
Just wondered if anyone had any recommendations on how to speed up the data loading? I've tried using the extend function in swig interface file to create a function that takes a 2 d array and loads the multistatistics objects in the unmanaged layer, but this seems to improve performance only marginally.
Thanks,
Martin
|