[Mono-list] Why did you use (or created) CLI or CLR if there is already "byte-code" for example?

Zaphod j0k3rin@yahoo.co.in
Tue, 24 Sep 2002 21:33:05 +0530


On Tue, Sep 24, 2002 at 08:15:38AM -0700, Darren Martz wrote:
> You made a comment regarding java being preferable for embedded
> environments, that caught my curiosity. You seemed to be basing that on
> the example of "add", which with byte-code has more methods. Is it safe
> to assume the CLI does more processing to come to the same conclusion?

Yes, the CLI does a coercion step to add to the woes of the add instruction.
But once it is JIT'd this makes no difference between JVM and CLR execution
for this same instruction.

> That seems counter to the performance difference we have all seen. I am
> sure to have missing something :)

Let me put it this way, JVM has a really dirty/clever feature to save 
local variables for embedded systems. The JVM local variables are untyped
viz they can contain any variable reference like int,bool or objects. This
requires a good amount of dynamic flow analysis for the JITer to figure
out what object is in LocalVar0 right now. Thankfully verification removes
the undecidability loop, but still it's complicated. 

CLR has typed local vars which simplifies JIT'ing a lot .. and infact this
is IMHO the major speed factor JIT'ing ..

But for interpreters this does not make much difference and the JVM model
allows minimal use of localvars and they are usually sorted by frequency
and the high f 3-5 are usually register variables (pointers) for embedded 
JVM Platforms.

> It would greatly benefit myself and perhaps others if there was
> something (non-microsoft) published on .net in the embedded world.

What did you mean by that ? , a mono chip ? ... (IMHO, the mono JIT is
good, but the interpreter sucks ....)