Withdrawn: 8282178: Replace simple iterations of Map.entrySet with Map.forEach calls

2022-05-19 Thread duke
On Wed, 23 Feb 2022 22:33:42 GMT, liach wrote: > Replaces simple `for (Map.Entry entry : map.entrySet())` with > `map.forEach((k, v) ->)` calls. This change is better for thread-safety and > reduces allocation for some map implementations. > > A more in-depth description of benefits is availab

Re: RFR: 8282178: Replace simple iterations of Map.entrySet with Map.forEach calls

2022-03-24 Thread liach
On Wed, 23 Feb 2022 22:33:42 GMT, liach wrote: > Replaces simple `for (Map.Entry entry : map.entrySet())` with > `map.forEach((k, v) ->)` calls. This change is better for thread-safety and > reduces allocation for some map implementations. > > A more in-depth description of benefits is availab

Re: Replace simple iterations of Map.entrySet with Map.forEach calls

2022-03-05 Thread -
I've made a benchmark with visualized results on putting a map of a f

Re: Replace simple iterations of Map.entrySet with Map.forEach calls

2022-03-05 Thread Remi Forax
- Original Message - > From: "Stuart Marks" > To: "-" , "core-libs-dev" > > Sent: Saturday, March 5, 2022 1:58:30 AM > Subject: Re: Replace simple iterations of Map.entrySet with Map.forEach calls > Hi, I have to say I'm pretty skep

Re: Replace simple iterations of Map.entrySet with Map.forEach calls

2022-03-04 Thread -
Sounds reasonable. Then how about the claims on performance improvement, especially for maps that have to create entry objects on entry set iteration? In my few jmh benchmarks run, it seems adding from identity hash map at least is sped up, while most other maps have no significant difference. On

Re: Replace simple iterations of Map.entrySet with Map.forEach calls

2022-03-04 Thread Stuart Marks
Hi, I have to say I'm pretty skeptical of this change overall. It sounds like the main issue is iterating over the entrySet of a map that might be modified concurrently. The bug report says > for concurrent maps, regular iteration of entrySet may fail spontaneously This isn't true for Concurr

Re: RFR: 8282178: Replace simple iterations of Map.entrySet with Map.forEach calls

2022-02-23 Thread liach
On Wed, 23 Feb 2022 23:50:49 GMT, PROgrm_JARvis wrote: >> Replaces simple `for (Map.Entry entry : map.entrySet())` with >> `map.forEach((k, v) ->)` calls. This change is better for thread-safety and >> reduces allocation for some map implementations. >> >> A more in-depth description of benefi

Re: RFR: 8282178: Replace simple iterations of Map.entrySet with Map.forEach calls

2022-02-23 Thread PROgrm_JARvis
On Wed, 23 Feb 2022 22:33:42 GMT, liach wrote: > Replaces simple `for (Map.Entry entry : map.entrySet())` with > `map.forEach((k, v) ->)` calls. This change is better for thread-safety and > reduces allocation for some map implementations. > > A more in-depth description of benefits is availab

RFR: 8282178: Replace simple iterations of Map.entrySet with Map.forEach calls

2022-02-23 Thread liach
x27; of https://git.openjdk.java.net/jdk into map-foreach - Fix initialization issues - 8282178: Replace simple iterations of Map.entrySet with Map.forEach calls Changes: https://git.openjdk.java.net/jdk/pull/7601/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7601&ra

Replace simple iterations of Map.entrySet with Map.forEach calls

2022-02-22 Thread -
Hello, In the patch for 8281631 , xenoamess intentionally avoided repeatedly calling Map::size, for it may not be constant-timed due to being concurrent. This alerted me that the for l