diff --git a/Performance.sln b/Performance.sln
new file mode 100644
index 00000000..8b734716
--- /dev/null
+++ b/Performance.sln
@@ -0,0 +1,38 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30723.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Performance", "src\Performance\Performance.csproj", "{F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Numerics", "src\Numerics\Numerics.csproj", "{B7CAE5F4-A23F-4438-B5BE-41226618B695}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release (No MKL)|Any CPU = Release (No MKL)|Any CPU
+ Release|Any CPU = Release|Any CPU
+ Release-Signed|Any CPU = Release-Signed|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}.Release (No MKL)|Any CPU.ActiveCfg = Release (No MKL)|Any CPU
+ {F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}.Release (No MKL)|Any CPU.Build.0 = Release (No MKL)|Any CPU
+ {F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}.Release-Signed|Any CPU.ActiveCfg = Release|Any CPU
+ {F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}.Release-Signed|Any CPU.Build.0 = Release|Any CPU
+ {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release (No MKL)|Any CPU.ActiveCfg = Release|Any CPU
+ {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release (No MKL)|Any CPU.Build.0 = Release|Any CPU
+ {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU
+ {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/packages/repositories.config b/packages/repositories.config
index 67cdfa51..5ceb59d5 100644
--- a/packages/repositories.config
+++ b/packages/repositories.config
@@ -5,5 +5,6 @@
+
\ No newline at end of file
diff --git a/src/Numerics/Properties/AssemblyInfo.cs b/src/Numerics/Properties/AssemblyInfo.cs
index 702caf79..00e09f59 100644
--- a/src/Numerics/Properties/AssemblyInfo.cs
+++ b/src/Numerics/Properties/AssemblyInfo.cs
@@ -73,6 +73,7 @@ using System.Runtime.InteropServices;
#else
[assembly: InternalsVisibleTo("MathNet.Numerics.UnitTests")]
[assembly: InternalsVisibleTo("MathNet.Numerics.UnitTestsMKL")]
+[assembly: InternalsVisibleTo("Performance")]
#endif
#endif
diff --git a/src/Performance/LinearAlgebra/DenseVectorAdd.cs b/src/Performance/LinearAlgebra/DenseVectorAdd.cs
new file mode 100644
index 00000000..a5d7f80b
--- /dev/null
+++ b/src/Performance/LinearAlgebra/DenseVectorAdd.cs
@@ -0,0 +1,113 @@
+using System;
+using Binarysharp.Benchmark;
+using MathNet.Numerics;
+using MathNet.Numerics.Providers.LinearAlgebra;
+using MathNet.Numerics.Providers.LinearAlgebra.Mkl;
+using MathNet.Numerics.Threading;
+using MathNet.Numerics.LinearAlgebra;
+using MathNet.Numerics.LinearAlgebra.Storage;
+
+namespace Performance.LinearAlgebra
+{
+ public class DenseVectorAdd
+ {
+ readonly Vector a;
+ readonly Vector b;
+
+ readonly ILinearAlgebraProvider managed = new ManagedLinearAlgebraProvider();
+ readonly ILinearAlgebraProvider mkl = new MklLinearAlgebraProvider();
+
+ public DenseVectorAdd(int size)
+ {
+ b = Vector.Build.Random(size);
+ a = Vector.Build.Random(size);
+
+ managed.InitializeVerify();
+ Control.LinearAlgebraProvider = managed;
+
+#if NATIVEMKL
+ mkl.InitializeVerify();
+ Console.WriteLine("MklProvider: {0}", mkl);
+#endif
+ }
+
+ [BenchSharkTask("AddOperator")]
+ public Vector AddOperator()
+ {
+ return a + b;
+ }
+
+ [BenchSharkTask("Map2")]
+ public Vector Map2()
+ {
+ return a.Map2((u, v) => u + v, b);
+ }
+
+ [BenchSharkTask("Loop")]
+ public Vector Loop()
+ {
+ var aa = ((DenseVectorStorage)a.Storage).Data;
+ var ab = ((DenseVectorStorage)b.Storage).Data;
+ var ar = new Double[aa.Length];
+ for (int i = 0; i < ar.Length; i++)
+ {
+ ar[i] = aa[i] + ab[i];
+ }
+ return Vector.Build.Dense(ar);
+ }
+
+ [BenchSharkTask("ParallelLoop4096")]
+ public Vector ParallelLoop4096()
+ {
+ var aa = ((DenseVectorStorage)a.Storage).Data;
+ var ab = ((DenseVectorStorage)b.Storage).Data;
+ var ar = new Double[aa.Length];
+ CommonParallel.For(0, ar.Length, 4096, (u, v) =>
+ {
+ for (int i = u; i < v; i++)
+ {
+ ar[i] = aa[i] + ab[i];
+ }
+ });
+ return Vector.Build.Dense(ar);
+ }
+
+ [BenchSharkTask("ParallelLoop32768")]
+ public Vector ParallelLoop32768()
+ {
+ var aa = ((DenseVectorStorage)a.Storage).Data;
+ var ab = ((DenseVectorStorage)b.Storage).Data;
+ var ar = new Double[aa.Length];
+ CommonParallel.For(0, ar.Length, 32768*32, (u, v) =>
+ {
+ for (int i = u; i < v; i++)
+ {
+ ar[i] = aa[i] + ab[i];
+ }
+ });
+ return Vector.Build.Dense(ar);
+ }
+
+ [BenchSharkTask("ManagedProvider")]
+ public Vector ManagedProvider()
+ {
+ var aa = ((DenseVectorStorage)a.Storage).Data;
+ var ab = ((DenseVectorStorage)b.Storage).Data;
+ var ar = new Double[aa.Length];
+ managed.AddArrays(aa, ab, ar);
+ return Vector.Build.Dense(ar);
+ }
+
+#if NATIVEMKL
+ [BenchSharkTask("MklProvider")]
+ public Vector MklProvider()
+ {
+ var aa = ((DenseVectorStorage)a.Storage).Data;
+ var ab = ((DenseVectorStorage)b.Storage).Data;
+ var ar = new Double[aa.Length];
+ mkl.AddArrays(aa, ab, ar);
+ return Vector.Build.Dense(ar);
+ }
+#endif
+ }
+}
diff --git a/src/Performance/Performance.csproj b/src/Performance/Performance.csproj
new file mode 100644
index 00000000..9fb79646
--- /dev/null
+++ b/src/Performance/Performance.csproj
@@ -0,0 +1,93 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {F2CA84AE-4B7C-46F5-9889-82BC5F9F0F4E}
+ Exe
+ Properties
+ Performance
+ Performance
+ v4.5
+ 512
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE;NATIVEMKL
+ prompt
+ 4
+ x64
+
+
+
+
+
+ bin\Release\
+ TRACE
+ true
+ pdbonly
+ x64
+ prompt
+ MinimumRecommendedRules.ruleset
+
+
+
+ ..\..\packages\BenchShark.1.0.0\lib\Benchmark.dll
+
+
+ ..\..\packages\ConsoleDump.0.6.0.1\lib\net40-Client\ConsoleDump.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {b7cae5f4-a23f-4438-b5be-41226618b695}
+ Numerics
+
+
+
+
+ libiomp5md.dll
+ PreserveNewest
+
+
+ MathNet.Numerics.MKL.dll
+ PreserveNewest
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Performance/Program.cs b/src/Performance/Program.cs
new file mode 100644
index 00000000..63ed8a8d
--- /dev/null
+++ b/src/Performance/Program.cs
@@ -0,0 +1,31 @@
+using System.Linq;
+using Binarysharp.Benchmark;
+using ConsoleDump;
+
+namespace Performance
+{
+ public class Program
+ {
+ public static void Main()
+ {
+ Run(new LinearAlgebra.DenseVectorAdd(10000000), 10, "Large");
+ Run(new LinearAlgebra.DenseVectorAdd(100), 10000, "Small");
+ }
+
+ static void Run(uint iterations, string suffix = null) where T:new()
+ {
+ var bench = new BenchShark();
+ var result = bench.EvaluateDecoratedTasks(iterations);
+ var label = string.IsNullOrEmpty(suffix) ? typeof (T).FullName : string.Concat(typeof (T).FullName, ": ", suffix);
+ result.FastestEvaluations.Select(x => new { x.Name, x.BestExecutionTime, x.AverageExecutionTime, x.WorstExecutionTime, x.TotalExecutionTime }).Dump(label);
+ }
+
+ static void Run(object obj, uint iterations, string suffix = null)
+ {
+ var bench = new BenchShark();
+ var result = bench.EvaluateDecoratedTasks(obj, iterations);
+ var label = string.IsNullOrEmpty(suffix) ? obj.GetType().FullName : string.Concat(obj.GetType().FullName, ": ", suffix);
+ result.FastestEvaluations.Select(x => new { x.Name, x.BestExecutionTime, x.AverageExecutionTime, x.WorstExecutionTime, x.TotalExecutionTime }).Dump(label);
+ }
+ }
+}
diff --git a/src/Performance/Properties/AssemblyInfo.cs b/src/Performance/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..32ffce1b
--- /dev/null
+++ b/src/Performance/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Performance")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Performance")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("180a3fd6-72b4-48ac-99d0-c2a590b6834a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/src/Performance/packages.config b/src/Performance/packages.config
new file mode 100644
index 00000000..d549694b
--- /dev/null
+++ b/src/Performance/packages.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file