<div dir="ltr">Hi everyone,<div><br></div><div>This is the first time I'm using a Java mailing list, so hopefully I'm doing it correctly.</div><div><br></div><div>I've heard that the Vector API should increase the performance when the computer has a SIMD architecture.</div><div><br></div><div>I wrote this code to test the Vector API and surprisingly it seems to be slower than the traditional way:</div><div><br><a href="https://github.com/brunosantanati/java-new-features/blob/main/src/main/java/me/bruno/santana/incubator/VectorApiDemo.java">https://github.com/brunosantanati/java-new-features/blob/main/src/main/java/me/bruno/santana/incubator/VectorApiDemo.java</a></div><div><br></div><div>I got 5969 ns (traditional way) VS 48475736 ns (Vector API code). Why is that? Maybe my laptop has no SIMD capabilities?</div><div><br></div><div>In addition to that, I have one more question. When I'm using the IntVector.fromArray method passing an array with length less than 16 I get an IndexOutOfBoundsException. Why is that?</div><div><br></div><div>Thank you!<br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br></div><div dir="ltr" style="text-align:center"><b>"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." Martin Fowler</b><br></div></div></div></div></div></div></div></div>