[Mono-list] Making a ruby.net compiler

Fergus Henderson fjh@cs.mu.OZ.AU
Fri, 9 May 2003 02:56:44 +1000


On 08-May-2003, Miguel de Icaza <miguel@ximian.com> wrote:
> > Also the .Net platform is really not optimal for dynamic languages.
> 
> I wish we could stop spreading the above meme, because it is not true. 

How do you know?

> JScript, Smalltalk and VB are two examples of dynamic languages that run
> on the .NET platform.

So?  How fast do they run?

(Note: check the Microsoft .NET license carefully before replying.
It forbids disclosing benchmark results without Microsoft's approval.
I wonder why?)

> 	* The CIL in fact can be very slow with some operations.
> 	  For example, to extract the length of a string, or compute
> 	  the sin of a double.  But most JIT engines will happily 
> 	  replace "call Sin.Math" (and its underlying assembly) with
> 	  the fsin opcode.  And call "Array.GetLength (int x)" with
> 	  mov $eax,[$ebx+offset]

Sure, but no CIL implementations thus far are capable of making more
significant changes, such as changing data representations to replace a
class hierarchy with the use of tag bits for representing discriminated
unions.  Nor does it look like we'll see this in the near future.

IMHO those are the kind of changes that would be required for
optimal performance for dynamic languages.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.