I looked through the mono SIMD api and I didn't see anything that would help the meshing code. Probably the most expensive operations in meshing are vector * quaternion and quaternion constructors. If these could be implemented in the SIMD api somehow that would really help a lot. All I really saw in there were operations on single float members which I don't really use.<div>
<br></div><div>Then again meshing happens almost entirely at sim startup. It only happens during normal operation if a prim is being rezzed or changed. I don't think that sim *users* would see any benefits.<br><br><div class="gmail_quote">
On Tue, Nov 4, 2008 at 6:37 AM, Eugen Leitl <span dir="ltr"><<a href="mailto:eugen@leitl.org">eugen@leitl.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<a href="http://tirania.org/blog/archive/2008/Nov-03.html" target="_blank">http://tirania.org/blog/archive/2008/Nov-03.html</a><br>
<br>
Mono's SIMD Support: Making Mono safe for Gaming<br>
<br>
This week at the Microsoft PDC we introduced a new feature in the Mono virtual machine that we have been working on quietly and will appear in our upcoming Mono 2.2 release (due in early December).<br>
<br>
I believe we are the first VM for managed code that provides an object-oriented API to the underlying CPU SIMD instructions.<br>
<br>
In short, this means that developers will be able to use the types in the Mono.Simd library and have those mapped directly to efficient vector operations on the hardware that supports it.<br>
<br>
With Mono.Simd, the core of a vector operations like updating the coordinates on an existing vector like the following example will go from 40-60 CPU instructions into 4 or so SSE instructions.<br>
<br>
Vector4f Move (Vector4f [] pos, ref Vector4f delta)<br>
{<br>
for (int i = 0; i < pos.Length; i++)<br>
pos [i] += delta;<br>
}<br>
<br>
<br>
Which in C# turns out to be a call into the method Vector4f.operator + (Vector4f a, Vector4f b) that is implemented like this:<br>
<br>
Vector3f static operator + (Vector3f a, Vector3f b)<br>
{<br>
return new Vector3f (a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w);<br>
}<br>
<br>
<br>
The core of the operation is inlined in the `Move' method and it looks like this:<br>
<br>
movups (%eax),%xmm0<br>
movups (%edi),%xmm1<br>
addps %xmm1,%xmm0<br>
movups %xmm0,(%eax)<br>
<br>
etc.<br>
<br>
--<br>
<font color="#888888">Eugen* Leitl <a href="<a href="http://leitl.org" target="_blank">http://leitl.org</a>">leitl</a> <a href="http://leitl.org" target="_blank">http://leitl.org</a><br>
______________________________________________________________<br>
ICBM: 48.07100, 11.36820 <a href="http://www.ativel.com" target="_blank">http://www.ativel.com</a> <a href="http://postbiota.org" target="_blank">http://postbiota.org</a><br>
8B29F6BE: 099D 78BA 2FD3 B014 B08A 7779 75B0 2443 8B29 F6BE<br>
_______________________________________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
</font></blockquote></div><br></div>