Re: RFR: 8156071: List.of: reduce array copying during creation

2020-10-05 Thread Tagir F . Valeev
On Fri, 2 Oct 2020 20:38:40 GMT, Paul Sandoz wrote: >> Plumb new internal static factory method to trust the array passed in, >> avoiding unnecessary copying. JMH results for >> the benchmark show about 15% improvement for the cases that were optimized, >> namely the 3 to 10 fixed arg cases. >>

Re: RFR: 8156071: List.of: reduce array copying during creation

2020-10-05 Thread Tagir F . Valeev
On Tue, 6 Oct 2020 03:10:34 GMT, Tagir F. Valeev wrote: >> Looks good, i wondered why the performance results were so slow then i >> looked more closely and saw "-Xint" was used. I >> usually don't ascribe much value to micro benchmarks run in interpreter only

Re: RFR: 8267587: Update java.util to use enhanced switch

2021-05-23 Thread Tagir F . Valeev
On Mon, 24 May 2021 04:20:23 GMT, Tagir F. Valeev wrote: > Inspired by PR#4088. Most of the changes are done automatically using > IntelliJ IDEA refactoring. Some manual adjustments are also performed, > including indentations, moving comments, extracting common cast out

RFR: 8267587: Update java.util to use enhanced switch

2021-05-23 Thread Tagir F . Valeev
Inspired by PR#4088. Most of the changes are done automatically using IntelliJ IDEA refactoring. Some manual adjustments are also performed, including indentations, moving comments, extracting common cast out of switch expression branches, etc. I also noticed that there are some switches having

Re: RFR: 8267587: Update java.util to use enhanced switch

2021-05-24 Thread Tagir F . Valeev
On Mon, 24 May 2021 13:44:36 GMT, Daniel Fuchs wrote: >> Inspired by PR#4088. Most of the changes are done automatically using >> IntelliJ IDEA refactoring. Some manual adjustments are also performed, >> including indentations, moving comments, extracting common cast out of >> switch expressio

Re: RFR: 8267587: Update java.util to use enhanced switch

2021-05-24 Thread Tagir F . Valeev
On Mon, 24 May 2021 13:46:58 GMT, Daniel Fuchs wrote: >> Inspired by PR#4088. Most of the changes are done automatically using >> IntelliJ IDEA refactoring. Some manual adjustments are also performed, >> including indentations, moving comments, extracting common cast out of >> switch expressio

Re: RFR: 8267587: Update java.util to use enhanced switch [v2]

2021-05-24 Thread Tagir F . Valeev
hat there are some switches having one branch only in > JapaneseImperialCalendar.java. Probably it would be better to replace them > with `if` statement? Tagir F. Valeev has updated the pull request incrementally with one additional commit since the last revision: Unindent switch case

Re: RFR: 8267587: Update java.util to use enhanced switch [v3]

2021-05-24 Thread Tagir F . Valeev
hat there are some switches having one branch only in > JapaneseImperialCalendar.java. Probably it would be better to replace them > with `if` statement? Tagir F. Valeev has updated the pull request incrementally with one additional commit since the last revision: Indent some lines to

Re: RFR: 8267587: Update java.util to use enhanced switch [v3]

2021-05-24 Thread Tagir F . Valeev
On Tue, 25 May 2021 03:48:41 GMT, Tagir F. Valeev wrote: >> src/java.base/share/classes/java/util/regex/CharPredicates.java line 217: >> >>> 215: case "WORD" -> WORD(); >>> 216: default -> null; >>> 217: }; &

Re: RFR: 8267587: Update java.util to use enhanced switch [v3]

2021-05-25 Thread Tagir F . Valeev
On Tue, 25 May 2021 10:31:33 GMT, Patrick Concannon wrote: >> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Indent some lines to make GitHub diff happier > > src/jav

Re: RFR: 8267587: Update java.util to use enhanced switch [v4]

2021-05-25 Thread Tagir F . Valeev
hat there are some switches having one branch only in > JapaneseImperialCalendar.java. Probably it would be better to replace them > with `if` statement? Tagir F. Valeev has updated the pull request incrementally with one additional commit since the last revision: Vertical alignment for

Re: RFR: 8267587: Update java.util to use enhanced switch [v5]

2021-05-25 Thread Tagir F . Valeev
hat there are some switches having one branch only in > JapaneseImperialCalendar.java. Probably it would be better to replace them > with `if` statement? Tagir F. Valeev has updated the pull request incrementally with one additional commit since the last revision: More vertical alignment

Re: RFR: 8267587: Update java.util to use enhanced switch [v5]

2021-05-25 Thread Tagir F . Valeev
On Tue, 25 May 2021 16:47:15 GMT, Brian Goetz wrote: >> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> More vertical alignment > > src/java.base/share/classes/java/util/Calen

Re: RFR: 8267587: Update java.util to use enhanced switch [v5]

2021-05-25 Thread Tagir F . Valeev
On Tue, 25 May 2021 15:51:38 GMT, Chris Hegarty wrote: >> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> More vertical alignment > > src/java.base/share/classes/java/util/Calen

Re: RFR: 8267587: Update java.util to use enhanced switch [v6]

2021-05-25 Thread Tagir F . Valeev
hat there are some switches having one branch only in > JapaneseImperialCalendar.java. Probably it would be better to replace them > with `if` statement? Tagir F. Valeev has updated the pull request incrementally with two additional commits since the last revision: - JapaneseImpe

Re: RFR: 8267587: Update java.util to use enhanced switch [v6]

2021-05-25 Thread Tagir F . Valeev
On Wed, 26 May 2021 02:22:42 GMT, Tagir F. Valeev wrote: >> Inspired by PR#4088. Most of the changes are done automatically using >> IntelliJ IDEA refactoring. Some manual adjustments are also performed, >> including indentations, moving comments, extracting common cast

Re: RFR: 8267587: Update java.util to use enhanced switch [v5]

2021-05-25 Thread Tagir F . Valeev
On Tue, 25 May 2021 16:52:06 GMT, Brian Goetz wrote: >> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> More vertical alignment > > src/java.base/share/classes/java/util/JapaneseI

Re: RFR: 8267587: Update java.util to use enhanced switch [v6]

2021-05-30 Thread Tagir F . Valeev
On Thu, 27 May 2021 13:47:16 GMT, Daniel Fuchs wrote: >> Tagir F. Valeev 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. > > src/java

Re: RFR: 8267587: Update java.util to use enhanced switch [v7]

2021-05-30 Thread Tagir F . Valeev
hat there are some switches having one branch only in > JapaneseImperialCalendar.java. Probably it would be better to replace them > with `if` statement? Tagir F. Valeev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits:

Integrated: 8267587: Update java.util to use enhanced switch

2021-05-31 Thread Tagir F . Valeev
On Mon, 24 May 2021 04:20:23 GMT, Tagir F. Valeev wrote: > Inspired by PR#4088. Most of the changes are done automatically using > IntelliJ IDEA refactoring. Some manual adjustments are also performed, > including indentations, moving comments, extracting common cast out