What are the best practices to follow for math.net numerics
matrices/vectors calculations in asp.net/c#
.
I'm performing huge number of (10000*30*35) matrices calculations. I'm using Intel MKL provider
and C#.Net TPL
but still it's taking ~40 seconds on 16 core system which is not acceptable,trying to bring it under 3-4 seconds.
All are dense matrices. When I checked with dotTrace profiler tool, columnsum is taking more time.
Any thoughts??
Below is sample code:
Parallel.For(0, count, (i) =>
{
for (int j = 0; j < year; j++)
{
for (int k = 0; k < iterations; k++)
{
a.PointwiseMultiply(b);
a.Multiply(b); a.Multiply(b);
a.Add(b);
a.Add(b).Subtract(b);
a.ColumnSums(); a.ColumnSums();
a.Subtract(1);
a.Multiply(2);
}
}
//Interlocked.Decrement(ref tc);
});