As you may have heard, I've been looking at using Mono as the next generation scripting engine within Second Life (the mysterious "long range tech" that Cory mentioned when I left Terra Nova).
Mono is an open source implementation of Microsoft's .NET development platform, including an implementation of an ECMA/ISO Common Language Infrastructure (CLI) standard virtual machine.
The CLI is designed to allow multiple languages to be compiled to a Common Intermediate Language (CIL), to be run safely on any Common Language Runtime (CLR) implementation like Mono or .NET and to be able to interoperate by using a Common Type System (CTS).
The plan is to compile the Linden Scripting Language (LSL) to CIL and run it on the Mono runtime embedded in Second Life. This allows us to take advantage of the advanced features of the Mono runtime like Just In Time (JIT) compilation to improve the performance of LSL execution, to extend LSL more easily and ultimately to allow the use of multiple programming languages and class libraries within SL.
I've now completed an initial version of the LSL to CIL compiler, implemented a test application which embeds the Mono runtime and run some performance tests comparing the current LSL interpreter with the embedded Mono runtime.
The initial figures look good, with Mono executing LSL scripts between 300 and 500 times faster than the current LSL interpreter.
The next step is to embed Mono within SL and, although there are still some big hurdles to jump over, it's looking promising.
(Bingo!)
That sounds great.
I hope you keep us posted about your progress.
Keep up the good work. :D
Posted by: Frans Charming | April 26, 2005 at 12:09 PM
I'm curious how this effects the LSL state machine.
Posted by: Strife Onizuka | May 01, 2005 at 04:30 PM
I'm curious how this effects the LSL state machine.
It doesn't, the LSL to CLR compiler and the application which embeds Mono implement LSL states as normal.
Posted by: Jim Purbrick | May 01, 2005 at 04:33 PM
Did these benchmarks include any timesharing between scripts?
JIT + concurrency sounds like fun... ;)
Posted by: Daryl Frost | May 09, 2005 at 08:13 AM
Daryl Frost> JIT + concurrency sounds like fun...
Concurrency is always fun ;-)
Not so much because of the JIT, but because there is so much of it.
In my experiments running concurrent scripts didn't impact on performance much at all, but concurrency is a big issue for other reasons, which i'll go in to in another post.
Posted by: Jim Purbrick | May 09, 2005 at 02:26 PM