RFR: 8357531: The `SegmentBulkOperations::fill` method can be improved using overlaps [v9]
Per Minborg
pminborg at openjdk.org
Tue Jun 10 17:31:20 UTC 2025
> This PR builds on a concept John Rose told me about some time ago. Instead of combining memory operations of various sizes, a single large and skewed memory operation can be made to clean up the tail of remaining bytes.
>
> This has the effect of simplifying and shortening the code. The number of branches to evaluate is reduced.
>
> It should be noted that the performance of the fill operation affects the allocation of new segments (as they are zeroed out before being returned to the client code).
>
> This PR passes tier1, tier2, and tier3 on multiple platforms.
Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
- Use Unsafe directly in benchmarks
- Merge branch 'master' into fill-overlap
- Use a fixed threashold for fill
- Fix benchmark
- Merge branch 'master' into fill-overlap
- Merge branch 'master' into fill-overlap
- Update test/micro/org/openjdk/bench/java/lang/foreign/SegmentBulkFill.java
Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>
- Update benchmark to reflect new fill method
- Simplify
- Add case for long operations and break out methods
- ... and 2 more: https://git.openjdk.org/jdk/compare/f8256c19...c2583a50
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25383/files
- new: https://git.openjdk.org/jdk/pull/25383/files/0da4c0be..c2583a50
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25383&range=08
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25383&range=07-08
Stats: 12500 lines in 430 files changed: 8818 ins; 2677 del; 1005 mod
Patch: https://git.openjdk.org/jdk/pull/25383.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25383/head:pull/25383
PR: https://git.openjdk.org/jdk/pull/25383
More information about the core-libs-dev
mailing list