Best Matrix Library -- RTMath

Questions about MultiCharts .NET and user contributed studies.
riverTrader
Posts: 64
Joined: 15 Aug 2011
Has thanked: 3 times
Been thanked: 50 times

Best Matrix Library -- RTMath

Postby riverTrader » 26 Sep 2012

Anyone interested in doing some fast matrix calculations, I've looked over a few libraries for C#. A couple are expensive, a couple are open source. Unless you're wanting an OpenCL wrapper for GPU parallelism, I think the best one is RTMath/FinMath. They're based on integration with Intel math kernel and performance primitive (sic) libraries.

I'm only just getting started here, but I thought I'd share.


https://www.rtmath.net/

-- makes calculations damn fast, at least anecdotally; I haven't run benchmarks of my own, but the ones they provide are fairly convincing.

Natively .Net like most programming languages does not handle matrices natively, so math must iterate through arrays (use for, not foreach loops!..) and therefore tends to be a bottleneck in any extensive matrix calculations. But with RTMath operations approach MatLab performance.

I would add the RTMath libraries to your toolkit if you are/are planning to write to OpenCL, native CUDA, etc. Unless you are stacking or multiplying large matrices, the GPU overhead (moving memory, etc) usually is not worth the effort. Also the sparseness of r/t calculations argues against GPU parallelism in most cases, though things are changing.

riverTrader
Posts: 64
Joined: 15 Aug 2011
Has thanked: 3 times
Been thanked: 50 times

Re: Best Matrix Library -- RTMath

Postby riverTrader » 13 Mar 2013

thought I'd update this. Actually after a lot of research NMath works better for my requirements.


Return to “MultiCharts .NET”