On Mon, 3 Jun 2024 11:16:49 GMT, Doug Lea <d...@openjdk.org> wrote: >> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1345: >> >>> 1343: int b = base, p = top, cap; >>> 1344: if (p - b > 0 && a != null && (cap = a.length) > 0) { >>> 1345: for (int m = cap - 1, s, nb;;) { >> >> @DougLea I'm curious, what effect did you see if moving the `p - b > 0` out >> of the loop conditional? > > This was part of saving a read in the common case of empty local queue. > Barely but reliably worth doing.
👍 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19131#discussion_r1624352663