[Mono-list] Do good practices and performance tips in .NET apply to Mono too?
curylod at asme.org
Sat Mar 29 04:17:51 UTC 2014
Much of that book still applies, as they are good techniques to optimize your code, regardless of the implementation specifics of the runtime. Not 100%, though. Several things that will be different:
* Profiling - you should become familiar with the mono framework profiler. Quick guide is here, but nothing will teach you better than just using it: http://mono-project.com/Profiler
* GC - there are two garbage collectors in mono, and they offer different performance characteristics. In my personal experience, sgen offers the best efficiency, but does not handle cases where the application must immediately grows to use a large memory set. You also have the ability to tweak some GC settings, such as fixing the heap size as described here: http://mono-project.com/Working_With_SGen. MS .NET GC doesn’t give you these options unless you are willing to use the CLR hosting API’s.
* OS differences - some techniques may not be applicable on POSIX systems. One example is ThreadPriority, which is controlled in a much different way on Windows vs. Linux as described in this post: http://mono.1490590.n4.nabble.com/Threading-ThreadPriority-under-Mono-Linux-vs-Windows-td1506796.html
Best of luck. Ignore trolls.
On Mar 24, 2014, at 7:12 PM, Casto <olivier.fuxet at gmail.com> wrote:
> It is quite difficult to find some articles that talk about performance
> optimizations and good practices (concerning performance) specifically for
> *Mono* programing.
> As Mono is different from .NET, I guess the compiler optimizes the code
> differently and produces different bytecode. The GC is also probably
> That's why I'm wondering if all good practices and performance tips (even
> micro optimizations) given for .NET developers are 100% good for Mono
> developers too?
> For example, would it be useful to read a book like this if I develop using
> Mono: Pro .NET Performance
> View this message in context: http://mono.1490590.n4.nabble.com/Do-good-practices-and-performance-tips-in-NET-apply-to-Mono-too-tp4662355.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> Mono-list maillist - Mono-list at lists.ximian.com
More information about the Mono-list