Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v6]

2023-03-10 Thread Viktor Klang
On Thu, 9 Mar 2023 16:05:32 GMT, Paul Sandoz wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removing unnecessary cast of argument to VarHandle getAndSet > > Marked as reviewed by psandoz (Reviewer). @PaulSandoz P

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v6]

2023-03-09 Thread Paul Sandoz
On Thu, 2 Mar 2023 11:22:26 GMT, Viktor Klang wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and indirect

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-03-09 Thread Viktor Klang
On Fri, 17 Feb 2023 16:48:27 GMT, Paul Sandoz wrote: >> Viktor Klang has refreshed the contents of this pull request, and previous >> commits have been removed. Incremental views are not available. > > That's a nice find, looks good. (Update the year in the copyright header.) @PaulSandoz Ready

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v4]

2023-03-02 Thread Paul Sandoz
On Tue, 28 Feb 2023 10:53:14 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/stream/ForEachOps.java line 513: >> >>> 511: // of right subtree (if any, which can be this task's >>> right sibling) >>> 512: // >>> 513: var leftDescendant = (For

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v6]

2023-03-02 Thread Viktor Klang
> I noticed when looking at the code that there was no real need to use a CHM > to perform the tracking of activation in an ordered fashion on > ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations > and indirection. Viktor Klang has updated the pull request incremental

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v5]

2023-03-02 Thread Viktor Klang
On Tue, 28 Feb 2023 16:11:25 GMT, Paul Sandoz wrote: >> Viktor Klang has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. The pull request contains one >> new commi

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v5]

2023-02-28 Thread Paul Sandoz
On Tue, 28 Feb 2023 11:09:37 GMT, Viktor Klang wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and indirec

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v5]

2023-02-28 Thread Viktor Klang
> I noticed when looking at the code that there was no real need to use a CHM > to perform the tracking of activation in an ordered fashion on > ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations > and indirection. Viktor Klang has refreshed the contents of this pull

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v4]

2023-02-28 Thread Viktor Klang
On Tue, 28 Feb 2023 09:04:21 GMT, ExE Boss wrote: >> Viktor Klang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains three commits: >> >> - Updating copyright header of ForEachOps.java and removing unnecessary >> suppression of an

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v4]

2023-02-28 Thread ExE Boss
On Mon, 27 Feb 2023 09:14:56 GMT, Viktor Klang wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and indirec

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v4]

2023-02-27 Thread Viktor Klang
> I noticed when looking at the code that there was no real need to use a CHM > to perform the tracking of activation in an ordered fashion on > ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations > and indirection. Viktor Klang has updated the pull request with a new

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-23 Thread Viktor Klang
On Fri, 17 Feb 2023 16:48:27 GMT, Paul Sandoz wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Write the initial value of the next reference without using the VarHandle > > That's a nice find, looks good. (Update th

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-20 Thread Viktor Klang
On Fri, 17 Feb 2023 16:48:27 GMT, Paul Sandoz wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Write the initial value of the next reference without using the VarHandle > > That's a nice find, looks good. (Update th

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v3]

2023-02-20 Thread Viktor Klang
> I noticed when looking at the code that there was no real need to use a CHM > to perform the tracking of activation in an ordered fashion on > ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations > and indirection. Viktor Klang has updated the pull request incremental

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-20 Thread Viktor Klang
On Sat, 18 Feb 2023 02:40:01 GMT, ExE Boss wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Write the initial value of the next reference without using the VarHandle > > src/java.base/share/classes/java/util/stream/

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-17 Thread ExE Boss
On Fri, 17 Feb 2023 11:39:21 GMT, Viktor Klang wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and indirec

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-17 Thread Paul Sandoz
On Fri, 17 Feb 2023 11:39:21 GMT, Viktor Klang wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and indirec

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-17 Thread Viktor Klang
On Thu, 16 Feb 2023 22:01:01 GMT, Paul Sandoz wrote: >> @PaulSandoz I'm usually a bit weary of piggybacking if it is not done on the >> same object, as future reorderings of the code might break that assumption. >> I wouldn't want to break anything silently so I made a rather conservative >> c

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

2023-02-17 Thread Viktor Klang
> I noticed when looking at the code that there was no real need to use a CHM > to perform the tracking of activation in an ordered fashion on > ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations > and indirection. Viktor Klang has updated the pull request incremental

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask

2023-02-16 Thread Paul Sandoz
On Thu, 16 Feb 2023 19:44:35 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/stream/ForEachOps.java line 431: >> >>> 429: // leftChild and rightChild were just created and not >>> fork():ed >>> 430: // yet so no need for a volatile write >>> 431

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask

2023-02-16 Thread Viktor Klang
On Thu, 16 Feb 2023 17:10:17 GMT, Paul Sandoz wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and indirect

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask

2023-02-16 Thread Paul Sandoz
On Tue, 31 Jan 2023 10:57:58 GMT, Viktor Klang wrote: > I noticed when looking at the code that there was no real need to use a CHM > to perform the tracking of activation in an ordered fashion on > ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations > and indirection

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask

2023-02-16 Thread Viktor Klang
On Thu, 16 Feb 2023 15:01:34 GMT, Per Minborg wrote: >> I noticed when looking at the code that there was no real need to use a CHM >> to perform the tracking of activation in an ordered fashion on >> ForEachOrderedTask, but instead a VarHandle can be used, reducing >> allocations and indirect

Re: RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask

2023-02-16 Thread Per Minborg
On Tue, 31 Jan 2023 10:57:58 GMT, Viktor Klang wrote: > I noticed when looking at the code that there was no real need to use a CHM > to perform the tracking of activation in an ordered fashion on > ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations > and indirection

RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask

2023-02-16 Thread Viktor Klang
I noticed when looking at the code that there was no real need to use a CHM to perform the tracking of activation in an ordered fashion on ForEachOrderedTask, but instead a VarHandle can be used, reducing allocations and indirection. - Commit messages: - JDK-8302666: Replace CHM wi