<div class="gmail_quote">On 16 January 2012 18:17, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org">SeeWebsiteForEmail@erdani.org</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 1/15/12 12:56 AM, Walter Bright wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I get a 2 to 2.5 speedup with the vector instructions on 64 bit Linux.<br>
Anyhow, it's good enough now to play around with. Consider it alpha<br>
quality. Expect bugs - but make bug reports, as there's a serious lack<br>
of source code to test it with.<br>
-----------------------<br>
import core.simd;<br>
<br>
void test1a(float[4] a) { }<br>
<br>
void test1()<br>
{<br>
float[4] a = 1.2;<br>
a[] = a[] * 3 + 7;<br>
test1a(a);<br>
}<br>
<br>
void test2a(float4 a) { }<br>
<br>
void test2()<br>
{<br>
float4 a = 1.2;<br>
a = a * 3 + 7;<br>
test2a(a);<br>
}<br>
</blockquote>
<br></div>
These two functions should have the same speed.</blockquote><div><br></div><div>A function using float arrays and a function using hardware vectors should certainly not be the same speed.</div></div>