On Tue, 18 Nov 2025 22:27:46 GMT, Doug Lea <[email protected]> wrote:

>> This set of updates reduces contention-based performance loss under heavy 
>> over-subscription, while also improving perfomance more generally.
>
> Doug Lea has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Tweaks

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1261:

> 1259:             if ((a = array) != null && (cap = a.length) > 0) { // else 
> disabled
> 1260:                 int k = (m = cap - 1) & s;
> 1261:                 if ((room = m - (s - b)) >= 0) {

Not that I think it'd make much of a difference, but it would be possible to do 
the following:

Suggestion:

                int k;
                if ((room = (k = (m = cap - 1) & s) - (s - b)) >= 0) {

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26479#discussion_r2546508029

Reply via email to