<div dir="auto">The developer experimenting with vectors has been running 21, so I did suggest to him recently to try newer releases or dev builds. I'm out of office right now but hoping to spend some time in the next week running this through a profiler to see if other missed optimizations are interfering with the vectorized version of the code.<div dir="auto"><br></div><div dir="auto">I also pointed out the other vector-based json project to him that was suggested by Daniel. I'm hopeful we can get more out of this than we have seen so far once I can help profile and dig into optimized results a little bit more.</div><div dir="auto"><br></div><div dir="auto">There are many other places in JRuby where we could use this, such as for handling text transcoding. There may even be some Ruby language constructs that could be vectorized by JRuby's compiler. I wish I had more hours in the day to experiment with this!</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, Jul 28, 2025, 22:40 Paul Sandoz <<a href="mailto:paul.sandoz@oracle.com">paul.sandoz@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="line-break:after-white-space">
Hi Daniel,
<div><br>
</div>
<div>Thanks for sharing. We have made progress optimizing the rearrange/selectFrom operations for UTF-8 related uses cases. The improvements were integrated into JDK release 24 [0].</div>
<div>
<div>Further optimizations are in flight for slice operations with constant inputs [1], which I believe can simplify the referenced code and may further boost performance, but we need to verify.</div>
</div>
<div><br>
</div>
<div>Charlie, what version of the JDK are you using?</div>
<div><br>
</div>
<div>Paul.</div>
<div><br>
</div>
<div>[0] <a href="https://openjdk.org/jeps/489" target="_blank" rel="noreferrer">https://openjdk.org/jeps/489</a><br>
<div>[1] <a href="https://github.com/openjdk/jdk/pull/24104" target="_blank" rel="noreferrer">https://github.com/openjdk/jdk/pull/24104</a></div>
<div><br>
<blockquote type="cite">
<div>On Jul 16, 2025, at 10:46 AM, Daniel Lemire <<a href="mailto:daniel@lemire.me" target="_blank" rel="noreferrer">daniel@lemire.me</a>> wrote:</div>
<br>
<div>

<div>
<div>Good day Charles,</div>
<div><br>
</div>
<div>The following link might be relevant :</div>
<div><br>
</div>
<div><a href="https://github.com/simdjson/simdjson-java" target="_blank" rel="noreferrer">https://github.com/simdjson/simdjson-java</a><br>
</div>
<div><br>
</div>
<div>- Daniel</div>
<div><br>
</div>
<blockquote type="cite" id="m_5949170455508475308qt">
<div dir="ltr">
<div>After seeing similar work done for the C version of the Ruby json standard library, I suggested to the author that we could do the same for JRuby using the Vector API. So he went and did it!</div>
<div><br>
</div>
<div><a href="https://github.com/ruby/json/pull/824" target="_blank" rel="noreferrer">https://github.com/ruby/json/pull/824</a></div>
<div><br>
</div>
<div>The results are somewhat mixed; performance of some cases is faster and other cases is slower. We would love to get input from anyone on this list interested in seeing another real-world use case for the Vector API.</div>
<div><br>
</div>
<div>I'm hopeful we can pump up these numbers with some additional tweaking in JRuby and json.</div>
<div><br>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div><b>Charles Oliver Nutter</b></div>
<div><i>Architect and Technologist</i></div>
<div>Headius Enterprises</div>
<div><a href="https://www.headius.com/" target="_blank" rel="noreferrer">https://www.headius.com</a></div>
<div>
<div><a href="mailto:headius@headius.com" target="_blank" rel="noreferrer">headius@headius.com</a></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>

</blockquote></div>