Vector API use for JRuby's json library

Paul Sandoz paul.sandoz at oracle.com
Mon Jul 28 19:40:41 UTC 2025


Hi Daniel,

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].
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.

Charlie, what version of the JDK are you using?

Paul.

[0] https://openjdk.org/jeps/489
[1] https://github.com/openjdk/jdk/pull/24104

On Jul 16, 2025, at 10:46 AM, Daniel Lemire <daniel at lemire.me> wrote:

Good day Charles,

The following link might be relevant :

https://github.com/simdjson/simdjson-java

- Daniel

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!

https://github.com/ruby/json/pull/824

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.

I'm hopeful we can pump up these numbers with some additional tweaking in JRuby and json.

Charles Oliver Nutter
Architect and Technologist
Headius Enterprises
https://www.headius.com<https://www.headius.com/>
headius at headius.com<mailto:headius at headius.com>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20250728/07e89d5c/attachment-0001.htm>


More information about the panama-dev mailing list