On Tue, 11 Mar 2025 13:46:52 GMT, Viktor Klang <vkl...@openjdk.org> wrote:
>> 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)` Right; thanks. Also moving the (nonvolatile) read up seems slightly better. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23702#discussion_r1990080545