<div class="gmail_quote">On 11 January 2012 02:47, F i L <span dir="ltr"><<a href="mailto:witte2008@gmail.com">witte2008@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Tuesday, 10 January 2012 at 14:14:41 UTC, Manu wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Just thought I might share a real-life case study today. Been a lot of talk<br>
of SIMD stuff, some people might be interested.<br>
<br>
Working on an android product today, I noticed the matrix library was<br>
burning a ridiculous amount of our frame time.<br>
The disassembly looked like pretty normal ARM float code, so rewriting a<br>
couple of the key routines to use the VFPU (carefully), our key device<br>
moved from 19fps -> 34fps (limited at 30, we can now ship).<br>
GalaxyS 2 is now running at 170fps, and devices we previously considered<br>
un-viable can now actually get a release! .. Most devices saw around 25-45%<br>
speed improvement.<br>
<br></div><div class="im">
Imagine if all vector code throughout was using the vector hardware nicely,<br>
and not just one or 2 key functions...<br></div><div class="im">
Getting the API right (intuitively encouraging proper usage and disallowing<br>
inefficient operations), it'll make a big difference!<br>
</div></blockquote>
<br>
Wow, impressive difference.<br>
<br>
In the future, how will [your idea of] D's SIMD vector libraries effect my math libraries? Will I simply replace:<br>
<br>
   struct Vector4(T) {<br>
       T x, y, z, w;<br>
   }<br>
<br>
with something like:<br>
<br>
   struct Vector4(T) {<br>
       __vector(T[4]) values;<br>
   }<br></blockquote><div><br></div><div>This is too simple an example, but yes that's basically the idea. Have some code of more complex operations?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
or will std.simd automatically provide a full range of vector operations (normalize, dot, cross, etc) like mono.simd? I can't help but hope for the latter, even if it does make my current efforts redundant, it would defiantly be a benefit to future D pioneers.<br>

</blockquote></div><div><br></div><div>Yes the lib would supply standard operations, probably even a matrix type or 2.</div>