[Opensim-users] Scripting: 10x speed boost with C#

Neil Canham neil at knowsense.co.uk
Sat Apr 23 14:27:49 UTC 2011


Interesting.  Thanks for that - I'd wondered about the speed difference, now
I know what to do for those slow scripts!

Neil Canham

On Sat, Apr 23, 2011 at 11:20 AM, Jeff Kelley <opensim at pescadoo.net> wrote:

> I like physics. And I like colors.
>
> I scripted a blackbody spectrum in LSL for a science sim. It was reasonably
> fast, 1.8s for a 400 points spectrum (380 to 780 nm) including Planck's law
> computation, CIE to RGB colorspace mapping with gamma correction, display
> with osDynamicTexture.
>
> That was fast, but not enough in my mind. Real-time interaction should be
> in the 1/10s range, not the second.
>
> So I rewrote the thing in C#. The key was to get rid of all llFunctions,
> LSL lists and string handling functions, math functions, even building
> manually the drawlist instead of calling osDraw routines. Execution time is
> now in the 0.1-0.2s range.
>
> Running Opensim 0.7.0.2 + MONO on a MacMini server, 2.53GHz Core Duo, 4GB.
>
> LSL code:       http://pastebin.com/MxsivsKS
> C# code:        http://pastebin.com/UR2gsnU7
>
> Nice!
>
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20110423/ab4b1d77/attachment.html>


More information about the Opensim-users mailing list