Quantcast
Channel: Math.NET Numerics
Viewing all articles
Browse latest Browse all 971

New Post: MKL is even slower

$
0
0
I tested MLK with the following simple code
Control.LinearAlgebraProvider = new MklLinearAlgebraProvider();
ContinuousUniform uniform = new ContinuousUniform(-0.5, 0.5);
DenseVector a = DenseVector.CreateRandom(10000, uniform);
DenseVector b = DenseVector.CreateRandom(10000, uniform);

Stopwatch watch = new Stopwatch();
watch.Start();
var c = a * b;
watch.Stop();
Console.WriteLine(watch.Elapsed);
I ran the code above first, and the result on the console is 00:00:01.0080696. Then I commented the provider setting line (the first line above) out, and the result on the console is 00:00:00.0021271.

Both runs are in Release mode.

Why is my code slower with MKL set?

Viewing all articles
Browse latest Browse all 971

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>