Re: Plans for 2.8 - GNOME Managed Language Services?



Hello,

> It gets more interesting when memory becomes an issue. Managed code
> tends to consume large amounts of memory because the garbage collection
> is usually a very low priority thread so as to not affect performance
> too severely. However when memory runs low, the priority of the garbage
> collection thread is usually increased to compensate - thats when
> performance can take a big hit - you either end up in swap or garbage
> collection consumes much more cpu. These memory issues have plagued
> managed code in the past and contributed to the downfall of Java OS. I
> would like to know how Mono compares in this respect.

As I mentioned before, one big advantage that the ECMA CLI has over the
JVM is that they support "value types".

Value types are your ints, your longs, your byte blobs and they are
equivalent to C "structs".  That means that there is no object
overhead.  Arrays of value types are contiguous in memory and these
guys can live on the stack.

Just a little example, the on my ThinkPad T40 at 1.6Ghz, the Mono C#
compiler can compile itself in 2.9 seconds.  In that time:

	* The Mono JIT has to JIT the C# compiler on the flight.
	  (1 meg of code, and some chunks of corlib, about another meg
	  are JITed).

	* 52,365 lines of C# code are parsed.

	* A portable binary is produced.

A full 3-stage bootstrap of the C# compiler takes 9.671 seconds
(compiling with debugging information).

All tests done with JITing, without using the ahead of time compiler,
which reduces the runtime in another second.

So I would say, we are pretty fast ;-)

Miguel.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]