Lambda the Ultimate

inactiveTopic Dynamic Languages on .NET
started 1/28/2003; 1:37:52 PM - last post 1/28/2003; 6:32:55 PM
Chris Double - Dynamic Languages on .NET  blueArrow
1/28/2003; 1:37:52 PM (reads: 605, responses: 1)
David Simmons has a write up on his web site about his implementation of SmallScript on .NET (called S#). It gives some insight into the performance problems that appear when implementing dynamic languages on the .NET platform and how he has worked around it. The end result being very good performance from the sound of things.

Read the article for details:

http://www.smallscript.org/Downloads/SSharp_NET_Notes.asp

Chris Double - Re: Dynamic Languages on .NET  blueArrow
1/28/2003; 6:32:55 PM (reads: 625, responses: 0)
From reading the article it's interesting to note that a 'pure-IL' solution was 'quite a bit slower by my performance requirements'. The workaround seemed to be to create a custom JIT compiler from IL to x86 specific for the requirements of the dynamic language:

"A week more of work and I had resolved all the design issues for providing both my own jitter for a hi-performance .NET x86 version, and a pure-IL solution that would work [albeit quite a bit slower by my performance requirements] on any .NET implementation [like the PocketPC]."

And it seems the potential is there to be even faster:

Even better, my new .NET dispatchers were acceptably close to the performance of my own AOS.IL jitters in S#.AOS. Translated, this means that it is now faster than any interpreted Smalltalk, and within a couple of cycles [of AOS performance] on a per dispatch decisions point basis. The difference between S#.NET dynamic dispatch/call performance C#.NET static dispatch performance is very reasonable [roughly within 6-15 cycles] per call. It could be directly cycle-for-cycle competitive if my S#.AOS jitter mechanisms were incorporated into Microsoft’s .NET jitters.

For those unfamiliar with SmallScript, AOS is the virtual machine that David designed that SmallScript.AOS (or S#.AOS by its other name) sits upon. It's a virtual machine specifically designed for dynamic languages I believe.