Re: RFR: 8315999: Improve Date toString performance [v5]

2023-09-11 Thread 温绍锦
> improve date toString performance, includes: > > java.util.Date.toString > java.util.Date.toGMTString > java.time.Instant.toString > java.time.LocalDate.toString > java.time.LocalDateTime.toString > java.time.LocalTime.toString 温绍锦 has updated the pull request incrementally with two additional

Re: RFR: 8315999: Improve Date toString performance [v6]

2023-09-11 Thread 温绍锦
> improve date toString performance, includes: > > java.util.Date.toString > java.util.Date.toGMTString > java.time.Instant.toString > java.time.LocalDate.toString > java.time.LocalDateTime.toString > java.time.LocalTime.toString 温绍锦 has updated the pull request incrementally with one additional

Re: RFR: 8315999: Improve Date toString performance [v4]

2023-09-11 Thread 温绍锦
> improve date toString performance, includes: > > java.util.Date.toString > java.util.Date.toGMTString > java.time.Instant.toString > java.time.LocalDate.toString > java.time.LocalDateTime.toString > java.time.LocalTime.toString 温绍锦 has updated the pull request with a new target base due to a me

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v18]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v17]

2023-09-11 Thread Chen Liang
On Tue, 12 Sep 2023 00:06:41 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess, whic

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v17]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v16]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v15]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

RFR: 8316057: javax/crypto/CryptoPermissions/InconsistentEntries.java fails on read-only JDK

2023-09-11 Thread Sergey Bylokhov
I am not sure that it is a good thing to modify the JDK when many tests are executed in parallel. But for now, I updated the test, it will be skipped if the setup stage fails. - Commit messages: - 8316057: javax/crypto/CryptoPermissions/InconsistentEntries.java fails on read-only

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v7]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 18:57:58 GMT, Roger Riggs wrote: >> If this PR is split into two PRs, the other two PRs I submitted #15658 >> #1 cannot be based on this PR. > > I agree, do the package move separate from the refactoring. > The other PRs can wait a bit or be committed as is and take part

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v10]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 19:03:45 GMT, Claes Redestad wrote: >> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 1: >> >>> 1: /* >> >> Can git be convinced to show this as a rename instead of a delete and add? >> The history will be cleaner. > > I just looked it up and git actua

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v14]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v13]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v12]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v11]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v10]

2023-09-11 Thread Claes Redestad
On Mon, 11 Sep 2023 18:58:56 GMT, Roger Riggs wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> revert code format > > src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 1: > >> 1: /* > > Can git be convi

Re: RFR: 8304956: Update KeyStore.getDefaultType​() specification to return pkcs12 as fallback [v2]

2023-09-11 Thread Ben Perez
> Replaced "jks" with "pkcs12" in both the spec and fallback for > `KeyStore.getDefaultType()` Ben Perez has updated the pull request incrementally with one additional commit since the last revision: Changed KEYSTORE_TYPE spec to indicate pkcs12 default - Changes: - all: https

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v7]

2023-09-11 Thread Roger Riggs
On Mon, 11 Sep 2023 16:36:55 GMT, 温绍锦 wrote: >> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 143: >> >>> 141: * code after loop unrolling. >>> 142: */ >>> 143: public static int stringSize(int x) { >> >> I suggest splitting the moves of `stringSize` `getCh

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v10]

2023-09-11 Thread Roger Riggs
On Mon, 11 Sep 2023 15:57:22 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess, whic

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v10]

2023-09-11 Thread Claes Redestad
On Mon, 11 Sep 2023 15:57:22 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess, whic

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v7]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 14:28:28 GMT, Chen Liang wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> move java.lang.StringLatin1::getChars to >> jdk.internal.util.DecimalDigits::getCharsLatin1 > > src/java.base/share/classes/jdk/i

Re: RFR: 8315999: Improve Date toString performance [v3]

2023-09-11 Thread 温绍锦
> improve date toString performance, includes: > > java.util.Date.toString > java.util.Date.toGMTString > java.time.Instant.toString > java.time.LocalDate.toString > java.time.LocalDateTime.toString > java.time.LocalTime.toString 温绍锦 has updated the pull request with a new target base due to a me

Re: RFR: 8315999: Improve Date toString performance [v2]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 14:42:33 GMT, Claes Redestad wrote: >> this place doesn't need off++ > > It was a suggestion, implicitly paired with removing ` + (year < 0 ? 1 : 0)` > from line 2188. The reason for not using off++ is that it can be executed out of order, which may result in better perform

Re: RFR: 8315999: Improve Date toString performance [v2]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 14:44:24 GMT, 温绍锦 wrote: >> improve date toString performance, includes: >> >> java.util.Date.toString >> java.util.Date.toGMTString >> java.time.Instant.toString >> java.time.LocalDate.toString >> java.time.LocalDateTime.toString >> java.time.LocalTime.toString > > 温绍锦 has u

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v10]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v9]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v8]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

Re: RFR: 8315999: Improve Date toString performance [v2]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 14:54:57 GMT, 温绍锦 wrote: >> src/java.base/share/classes/java/time/Instant.java line 1355: >> >>> 1353: @Override >>> 1354: public String toString() { >>> 1355: return DateTimeFormatter.ISO_INSTANT.format(this); >> >> Have you considered potentially more gener

Re: RFR: 8315999: Improve Date toString performance [v2]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 13:29:14 GMT, Claes Redestad wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> fix LocalDate.getChars offset > > src/java.base/share/classes/java/time/Instant.java line 1355: > >> 1353: @Override >> 1

Re: RFR: 8315999: Improve Date toString performance [v2]

2023-09-11 Thread Claes Redestad
On Mon, 11 Sep 2023 14:38:28 GMT, 温绍锦 wrote: >> src/java.base/share/classes/java/time/LocalDate.java line 2181: >> >>> 2179: if (yearAbs < 1000) { >>> 2180: if (year < 0) { >>> 2181: buf[off] = '-'; >> >> `buf[off++] = '-';` > > this place doesn't need off++

Re: RFR: 8315999: Improve Date toString performance [v2]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 13:50:30 GMT, Claes Redestad wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> fix LocalDate.getChars offset > > src/java.base/share/classes/java/time/LocalDate.java line 2181: > >> 2179: if (year

Re: RFR: 8315999: Improve Date toString performance [v2]

2023-09-11 Thread 温绍锦
> improve date toString performance, includes: > > java.util.Date.toString > java.util.Date.toGMTString > java.time.Instant.toString > java.time.LocalDate.toString > java.time.LocalDateTime.toString > java.time.LocalTime.toString 温绍锦 has updated the pull request incrementally with one additional

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v7]

2023-09-11 Thread Chen Liang
On Mon, 11 Sep 2023 12:23:36 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess, whic

Re: RFR: 8315999: Improve Date toString performance

2023-09-11 Thread Chen Liang
On Mon, 11 Sep 2023 13:45:43 GMT, 温绍锦 wrote: > After PR #15651 is merged, changes will be made based on the new API. Until > then, you can help review other changes. I mean, OpenJDK's GitHub bots has a special handling system that allows you to include code from #15651 in this PR: 1. Merge yo

Re: RFR: 8315999: Improve Date toString performance

2023-09-11 Thread Claes Redestad
On Mon, 11 Sep 2023 12:12:17 GMT, 温绍锦 wrote: > improve date toString performance, includes: > > java.util.Date.toString > java.util.Date.toGMTString > java.time.Instant.toString > java.time.LocalDate.toString > java.time.LocalDateTime.toString > java.time.LocalTime.toString As @liach says this

Re: RFR: 8315999: Improve Date toString performance

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 13:42:30 GMT, Chen Liang wrote: > I think you should make this a dependent of #15651, so you can change the > base branch of pr to `openjdk:pr/15651` and you can base your work off that > pull request too. After PR #15651 is merged, changes will be made based on the new API

Re: RFR: 8315999: Improve Date toString performance

2023-09-11 Thread Chen Liang
On Mon, 11 Sep 2023 12:12:17 GMT, 温绍锦 wrote: > improve date toString performance, includes: > > java.util.Date.toString > java.util.Date.toGMTString > java.time.Instant.toString > java.time.LocalDate.toString > java.time.LocalDateTime.toString > java.time.LocalTime.toString I think you should m

Re: RFR: 8315999: Improve Date toString performance

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 12:12:17 GMT, 温绍锦 wrote: > improve date toString performance, includes: > > java.util.Date.toString > java.util.Date.toGMTString > java.time.Instant.toString > java.time.LocalDate.toString > java.time.LocalDateTime.toString > java.time.LocalTime.toString @cl4es can you help

Re: RFR: 8315999: Improve Date toString performance

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 12:12:17 GMT, 温绍锦 wrote: > improve date toString performance, includes: > > java.util.Date.toString > java.util.Date.toGMTString > java.time.Instant.toString > java.time.LocalDate.toString > java.time.LocalDateTime.toString > java.time.LocalTime.toString @liach can you help

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 10:33:10 GMT, 温绍锦 wrote: >> These weren't in `java.util.DecimalDigits` but have been copied from >> `java.lang.StringLatin1` - part of an unfinished refactoring? There's no >> clear-cut answer where these best fits but it seems reasonable to keep them >> in `StringLatin1` a

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v7]

2023-09-11 Thread 温绍锦
> Some codes in core libs are duplicated, including: > java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS > java.util.DecimalDigits::size -> java.lang.Long.stringSize > > We can reduce duplication through JavaLangAccess, which is also needed in > other places, such as: > http

RFR: 8315999: Improve Date toString performance

2023-09-11 Thread 温绍锦
improve date toString performance, includes: java.util.Date.toString java.util.Date.toGMTString java.time.Instant.toString java.time.LocalDate.toString java.time.LocalDateTime.toString java.time.LocalTime.toString - Commit messages: - improve date toString performance, includes: Ch

Re: RFR: 8267174: Many test files have the wrong Copyright header

2023-09-11 Thread Magnus Ihse Bursie
On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect > copyright header, which includes the "classpath" exception text. This patch > removes that text from all test files that I could find it in. I did this > using a

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-11 Thread 温绍锦
On Mon, 11 Sep 2023 09:38:44 GMT, Claes Redestad wrote: >> src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 201: >> >>> 199: * @return index of the most significant digit or minus sign, if >>> present >>> 200: */ >>> 201: public static int getChars(int i, int

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-11 Thread Claes Redestad
On Mon, 11 Sep 2023 08:49:18 GMT, Andrey Turbanov wrote: >> 温绍锦 has updated the pull request incrementally with two additional commits >> since the last revision: >> >> - remove duplicate stringSize >> - update related comments > > src/java.base/share/classes/jdk/internal/util/DecimalDigits.j

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-11 Thread Andrey Turbanov
On Mon, 11 Sep 2023 04:00:34 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess, whic

Re: RFR: 8267174: Many test files have the wrong Copyright header

2023-09-11 Thread David Holmes
On Tue, 5 Sep 2023 22:49:41 GMT, Erik Joelsson wrote: > There are a number of files in the `test` directory that have an incorrect > copyright header, which includes the "classpath" exception text. This patch > removes that text from all test files that I could find it in. I did this > using a