RFR: 8370822: Improve performance for MemorySegment::fill

Igor Rudenko duke at openjdk.org
Fri Oct 31 14:20:02 UTC 2025


On Fri, 31 Oct 2025 09:15:18 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> I ran some benchmarks and was unable to see any significant performance improvements. I ran on Linux (a64/x64), macOS a64, and Windows x64. Can you provide benchmarks that support this is a performance improvement?

Hello Per-Ake,

I explored the corresponding code using JITWatch. My analysis shows that the patch reduces the number of instructions (in both bytecode and JIT-compiled assembly). However, as your benchmarks demonstrate, this does not lead to measurable overall performance improvement, the differences fall within normal noise.

So, the idea for the patch may be clarity and maintainability, as it simplifies and shortens the code.

Thanks.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28031#issuecomment-3473299353


More information about the core-libs-dev mailing list