<div dir="ltr"><p style="background:transparent;color:rgb(14,16,26);margin-top:0pt;margin-bottom:0pt"><span style="background:transparent;margin-top:0pt;margin-bottom:0pt">I am benchmarking some algorithms, wondering how much the JIT applies auto-vectorization. I set up a JMH project and am trying to turn auto-vectorization off.</span></p><p style="background:transparent;color:rgb(14,16,26);margin-top:0pt;margin-bottom:0pt"><span style="background:transparent;margin-top:0pt;margin-bottom:0pt"><br></span></p><p style="background:transparent;color:rgb(14,16,26);margin-top:0pt;margin-bottom:0pt"><span style="background:transparent;margin-top:0pt;margin-bottom:0pt">The code snipped, and the results can be found in the following gist: </span><a href="https://gist.github.com/Styp/16e8a20fedfb771107377407fc1cf210" target="_blank" style="color:rgb(74,110,224);background:transparent;margin-top:0pt;margin-bottom:0pt"><span style="background:transparent;margin-top:0pt;margin-bottom:0pt">https://gist.github.com/Styp/16e8a20fedfb771107377407fc1cf210</span></a><span style="background:transparent;margin-top:0pt;margin-bottom:0pt"> (Sorry too long to post here).</span></p><p style="background:transparent;color:rgb(14,16,26);margin-top:0pt;margin-bottom:0pt"><span style="background:transparent;margin-top:0pt;margin-bottom:0pt"><br></span></p><p style="background:transparent;color:rgb(14,16,26);margin-top:0pt;margin-bottom:0pt"><span style="background:transparent;margin-top:0pt;margin-bottom:0pt">The results indicate that one is faster than the other, which is expected. Nevertheless, the deviation is so high that the benchmark is not representative. What irritates me the most is that the version with turned of SuperWord still contains vadd and vmove instructions in the Jit-generated code. Do I miss something? How can I enforce vectorization turned off for good?</span></p><p style="background:transparent;color:rgb(14,16,26);margin-top:0pt;margin-bottom:0pt"><span style="background:transparent;margin-top:0pt;margin-bottom:0pt">Any ideas? </span></p></div>