Overview

Overview

M# (“M sharp”) is an implementation of the M programming language based on Microsoft’s Dynamic Language Runtime (DLR). Other M implementations include Matlab®, Octave, and SciLab. Numerics.NET is used as the underlying computational kernel.

Because M# is a .NET language, it can make direct use of the vast collection of types and libraries available for the .NET framework. In particular, unlike other implementations of the M language, M# can use advanced numerical types like arbitrary precision integers, rational numbers and floating-point numbers.

Performance

M# uses the same technology as Microsoft’s two dynamic languages, IronPython and IronRuby, to provide the optimal balance of flexibility and speed. The numerical horesepower is provided by Numerics.NET. As a result, M# can compete with the fastest implementations around, and significantly outperforms open source implementations.

The chart below shows the summary results of a benchmark created by David Knowles of the University of Cambridge in the UK. The chart shows summary scores, where lower values indicate better performance.

M# benchmark

All M implementations used the exact same M-file. A port to the R statistical package was also included in the comparison.

Resources

Watch our Lang.NET 2009 presentation, which included a live demo of some of the features of M#.