RFR: 8319447: Improve performance of delayed task handling [v8]

Viktor Klang vklang at openjdk.org
Tue Mar 11 13:50:08 UTC 2025


On Mon, 10 Mar 2025 14:34:42 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> Doug Lea has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Disambiguate caller-runs vs Interruptible
>
> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1301:
> 
>> 1299:                 if ((room == 0 ||        // pad if no caller-run
>> 1300:                      a[m & (s - ((internal || task == null ||
>> 1301:                                   task.noUserHelp() == 0) ? 1 : 2))] == null) &&
> 
> Not saying that we should, but it would be possible to make this branch-free.

Something like `1 + (task.noUserHelp() >>> 24)`

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23702#discussion_r1989317149


More information about the core-libs-dev mailing list