<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">Hi all,</div><div dir="ltr"><br></div><div dir="ltr">If I can jump in.</div><div dir="ltr"><br></div><div dir="ltr">This can be related a bit to stride limit which was already increased here. </div><div dir="ltr"><br></div><div dir="ltr"><a href="https://github.com/openjdk/loom/commit/1f51e13ea763e642dac440142e9cb3a177df7959">https://github.com/openjdk/loom/commit/1f51e13ea763e642dac440142e9cb3a177df7959</a></div><div dir="ltr"><br></div><div dir="ltr">Can this be caused by the stride size?</div><div dir="ltr"><br></div><div dir="ltr">With this change we decide that stride limit should be vector size in bytes.</div><div dir="ltr"><br></div><div dir="ltr">Best regards,</div><div dir="ltr">Rado</div><div dir="ltr"><br><blockquote type="cite">On 15 May 2024, at 12:47, Andrii Lomakin <andrii0lomakin@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Hi guys.<div><div>Thank you for your feedback. I appreciate it.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 15, 2024 at 11:07 AM Chris Hegarty <<a href="mailto:chegar999@gmail.com">chegar999@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
On 14/05/2024 16:41, Paul Sandoz wrote:<br>
> C2 can unroll loops with explicit vector operations using the Vector API. I don’t know the exact details but I presume if a loop is auto-vectorized the result can then be unrolled similarly as if explicit vector operations are present.<br>
> <br>
> To compare you can switch off loop unrolling with the HotSpot option -XX:LoopUnrollLimit=0.<br>
> <br>
> I have found that most of the benefit with explicit unrolling of vector operations is to break data dependencies e.g. when reducing/accumulating.<br>
<br>
This is exactly what we observe too, e.g.<br>
<br>
<a href="https://github.com/apache/lucene/blob/main/lucene/core/src/java21/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java#L124-L128" rel="noreferrer" target="_blank">https://github.com/apache/lucene/blob/main/lucene/core/src/java21/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java#L124-L128</a><br>
<br>
-Chris.<br>
</blockquote></div>
</div></blockquote></body></html>