Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v4]

2023-09-23 Thread 温绍锦
> @cl4es made performance optimizations for the simple specifiers of > String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the > same idea, I continued to make improvements. I made patterns like %2d %02d > also be optimized. > > The following are the test results based on Mac

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v3]

2023-09-23 Thread 温绍锦
> @cl4es made performance optimizations for the simple specifiers of > String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the > same idea, I continued to make improvements. I made patterns like %2d %02d > also be optimized. > > The following are the test results based on Mac

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v2]

2023-09-23 Thread 温绍锦
> @cl4es made performance optimizations for the simple specifiers of > String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the > same idea, I continued to make improvements. I made patterns like %2d %02d > also be optimized. > > The following are the test results based on Mac

Re: RFR: 8316150: Refactor get chars and string size [v21]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: 8316641: VarHandle template classes can share code in the base class [v5]

2023-09-23 Thread Chen Liang
> VarHandle implementations have many static fields and methods that can be > pulled to the common superclass to avoid repeated initialization and code > duplication. > > In addition, the Unsafe-based Buffer field access are replaced by usage of > public methods or JavaNioAccess. Chen Liang ha

Re: RFR: 8316150: Refactor get chars and string size [v20]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v9]

2023-09-23 Thread iaroslavski
On Thu, 21 Sep 2023 23:40:25 GMT, Srinivas Vamsi Parasa wrote: >>> Hi Vladimir, >>> >>> Just trying to understand: is there a reason to use >>> `DualPivotQuicksort_RadixForParallel.java` and >>> `DualPivotQuicksort_RadixForAll.java`? >>> >>> Would it not be sufficient to do the following two

Re: RFR: 8316150: Refactor get chars and string size [v19]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: 8316150: Refactor get chars and string size [v18]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: 8316150: Refactor get chars and string size [v17]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: 8316150: Refactor get chars and string size [v16]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with two additional commits since the last revisio

Re: RFR: 8316150: Refactor get chars and string size [v15]

2023-09-23 Thread ExE Boss
On Sat, 23 Sep 2023 17:44:51 GMT, 温绍锦 wrote: >> 1. Reduce duplicate stringSize code >> 2. Move java.lang.StringLatin1.getChars to >> jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other >> packages also need to use this method > > 温绍锦 has updated the pull request incremental

Re: RFR: 8316150: Refactor get chars and string size [v15]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with two additional commits since the last revisio

Re: RFR: 8316150: Refactor get chars and string size [v14]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: A Discussion on Wrapper Class Source Code

2023-09-23 Thread Erdong Ren
Hi everyone, In java.lang.Integer, there is the following code snippet: static final int low = -128; // 936 int size = (high - low) + 1; // 961 int j = low; // 966 When I read the java.lang.Byte source code, I noticed that there is similar logic, but the coding style is somewhat different. So I

Re: RFR: 8316150: Refactor get chars and string size [v13]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: 8316150: Refactor get chars and string size [v7]

2023-09-23 Thread 温绍锦
On Fri, 22 Sep 2023 12:09:48 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/util/FormatItem.java line 148: >> >>> 146: int length = DecimalDigits.stringSize(value); >>> 147: this.digits = new byte[length]; >>> 148: DecimalDigits.getCharsLatin1(valu

Re: RFR: 8316150: Refactor get chars and string size [v12]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: 8316150: Refactor get chars and string size [v11]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: 8316150: Refactor get chars and string size [v10]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: 8316641: VarHandle template classes can share code in the base class [v4]

2023-09-23 Thread Chen Liang
> VarHandle implementations have many static fields and methods that can be > pulled to the common superclass to avoid repeated initialization and code > duplication. > > In addition, the Unsafe-based Buffer field access are replaced by usage of > public methods or JavaNioAccess. Chen Liang ha

Re: RFR: 8316150: Refactor get chars and string size [v9]

2023-09-23 Thread 温绍锦
On Sat, 23 Sep 2023 09:47:42 GMT, 温绍锦 wrote: >> 1. Reduce duplicate stringSize code >> 2. Move java.lang.StringLatin1.getChars to >> jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other >> packages also need to use this method > > 温绍锦 has updated the pull request incremental

Re: RFR: 8316150: Refactor get chars and string size [v9]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: 8316150: Refactor get chars and string size [v8]

2023-09-23 Thread Chen Liang
On Sat, 23 Sep 2023 07:39:59 GMT, 温绍锦 wrote: >> 1. Reduce duplicate stringSize code >> 2. Move java.lang.StringLatin1.getChars to >> jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other >> packages also need to use this method > > 温绍锦 has updated the pull request incremental

Re: RFR: 8316150: Refactor get chars and string size [v8]

2023-09-23 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision