RFR: 8339531: Improve performance of MemorySegment::mismatch [v12]

Per Minborg pminborg at openjdk.org
Thu Sep 12 12:51:05 UTC 2024


On Thu, 12 Sep 2024 11:34:44 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> In other words, I don't think the goal of this (and related) PR is "improve mismatch so that it blows other alternatives - like Unsafe, or array" out of the water - as much as it is "make sure that using MemorySegment::mismatch is competitive with other offerings".
>
> Then, an interesting part of these PRs is that we have uncovered quite a lot of issues both with our intrinsics (e.g. `fill` is not vectorized and works badly on Windows, mismatch works poorly on aarch64) *and* missed optimization opportunities - e.g. "short" segment loops are not optimized as tightly as they could. But it is not the job of these PRs to fix all these issues. The main focus remain: for small sizes it is not worth going down intrinsics-lane. Let's stick to it (in the interest of keeping the review focused).

Yepp. So, let us keep these tricks up our sleeves and then maybe come back with a new PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20848#discussion_r1756793795


More information about the core-libs-dev mailing list