Integrated: 8289431: (zipfs) Avoid redundant HashMap.get in ZipFileSystemProvider.removeFileSystem

2022-07-03 Thread Andrey Turbanov
On Tue, 28 Jun 2022 21:07:41 GMT, Andrey Turbanov wrote: > There is overload method HashMap.remove(key,value) which also checks value > equality. > It's shorter and faster than pair get+remove. This pull request has now been integrated. Changeset: 8e7a3cb5 Author:Andrey Turbanov URL:

Re: RFR: 8289431: (zipfs) Avoid redundant HashMap.get in ZipFileSystemProvider.removeFileSystem [v2]

2022-07-03 Thread Andrey Turbanov
On Wed, 29 Jun 2022 08:20:31 GMT, Andrey Turbanov wrote: >> There is overload method HashMap.remove(key,value) which also checks value >> equality. >> It's shorter and faster than pair get+remove. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v7]

2022-07-03 Thread Peter Levart
On Mon, 4 Jul 2022 06:19:00 GMT, Peter Levart wrote: >> hmm, is the faster getParameters (without explicit index access) a result of >> the annotation? getParameter0 shows the documented effect but isn't quite >> our use case here. > > ...neither is obtaining a cloned array and passing its refe

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v7]

2022-07-03 Thread Peter Levart
On Sun, 3 Jul 2022 20:12:13 GMT, liach wrote: >> With `static` and without `@Stable` the benchmark yields >> >> BenchmarkMode Cnt Score Error Units >> AccessParamsBenchmark.getParameter0 avgt 10 1,212 ± 0,083 ns/op >> AccessParamsBenchmark.getParameters avg

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-03 Thread David Holmes
On Sat, 2 Jul 2022 21:21:37 GMT, Ryan Ernst wrote: >> This is a followup to simplify Shutdown.exit after the removal of >> finalizers (https://bugs.openjdk.org/browse/JDK-8198250). Once agreement >> on the approach has been reached in this PR, a CSR will be filed to >> propose the spec change to

Re: RFR: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time [v2]

2022-07-03 Thread Attila Szegedi
On Sun, 3 Jul 2022 20:42:53 GMT, liach wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8288723: Avoid redundant ConcurrentHashMap.get call in java.time >> use computeIfAbsent where lambda could be short and st

Re: RFR: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time [v2]

2022-07-03 Thread liach
On Wed, 22 Jun 2022 21:29:50 GMT, Andrey Turbanov wrote: >> Instead of separate ConcurrentHashMap.get call, we can use result of >> previous putIfAbsent call. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8288723: Avo

Re: RFR: 8289431: (zipfs) Avoid redundant HashMap.get in ZipFileSystemProvider.removeFileSystem [v2]

2022-07-03 Thread Attila Szegedi
On Wed, 29 Jun 2022 08:20:31 GMT, Andrey Turbanov wrote: >> There is overload method HashMap.remove(key,value) which also checks value >> equality. >> It's shorter and faster than pair get+remove. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since

Re: RFR: 8288327: Executable.hasRealParameterData should not be volatile [v7]

2022-07-03 Thread liach
On Fri, 1 Jul 2022 20:39:49 GMT, Сергей Цыпанов wrote: >> @Stable is only effective if the path leading to @Stable value can be >> constant-folded by JIT. In above test, you have an instance field Method >> method. This can not be constant-folded, so neither can @stable fiels in the >> Field o

Re: RFR: 8289484: Cleanup unnecessary null comparison before instanceof check in java.rmi

2022-07-03 Thread Attila Szegedi
On Wed, 29 Jun 2022 21:11:09 GMT, Andrey Turbanov wrote: > Update code checks both non-null and instance of a class in jdk.hotspot.agent > module classes. > The checks and explicit casts could also be replaced with pattern matching > for the instanceof operator. > > For example, the following

Re: RFR: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time [v2]

2022-07-03 Thread Attila Szegedi
On Tue, 28 Jun 2022 07:27:30 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/java/time/temporal/WeekFields.java line 331: >> >>> 329: String key = firstDayOfWeek.toString() + >>> minimalDaysInFirstWeek; >>> 330: WeekFields rules = CACHE.get(key); >>> 331: if (

Re: RFR: 8288723: Avoid redundant ConcurrentHashMap.get call in java.time [v2]

2022-07-03 Thread Attila Szegedi
On Wed, 22 Jun 2022 21:29:50 GMT, Andrey Turbanov wrote: >> Instead of separate ConcurrentHashMap.get call, we can use result of >> previous putIfAbsent call. > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8288723: Avo