Mono performance

monoperformanceruntime

Are there any performance benchmarks for Mono compared to say Java in GNU/Linux?

Have you ever tested Mono's performance?

Best Solution

The latest version of this shoot-out can be found here.

In a nutshell, compared to Java, Mono uses much less memory and runs a little slower.

To keep things in perspective, they both run about the same speed in the grand scheme of things. They both run these tests orders of magnitude faster than languages like Ruby, LUA, Python, PHP, and Perl. They are both in the same ball-park as Pascal, OCaml, Haskell, and LISP which makes them about half as fast as C and C++. Click here for more detail.

To nitpick, we should be clear that our answers here compare Java and Mono C#. Both Mono and the JVM are environments targeted by various languages and the choice of language matters. For example, if we compare F# on Mono with Clojure on the JVM we get totally different results and suddenly "Mono" is "faster".

While these comparisons are interesting and informative, you have to take them with a grain of salt. First, although some people do, most people writing Java and C# code are not running nothing but numerical algorithms in tight loops. Second, in some of these languages, the tested algorithms may just be calling into libraries that are written in C and not in the target language at all. Finally, other benchmarks (and implementations) would likely yield different results.

Still, it is reasonable to infer that Go is much faster than Ruby, C++ is faster than Go, and both Java and C# perform pretty reasonably given how productive they are (IMHO).