From liach at openjdk.org Thu May 1 14:01:55 2025 From: liach at openjdk.org (Chen Liang) Date: Thu, 1 May 2025 14:01:55 GMT Subject: RFR: 8356021: Use Double::hashCode in java.util.Locale::hashCode In-Reply-To: References: Message-ID: On Wed, 30 Apr 2025 18:01:08 GMT, Shaojin Wen wrote: > Similar to #24959, java.util.Locale.hashCode can also make the same improvement. > > Replace manual bitwise operations in hashCode implementations of java.util.Locale with Double::hashCode. Thanks for this cleanup, indeed equivalent. ------------- Marked as reviewed by liach (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24971#pullrequestreview-2809839693 From rriggs at openjdk.org Thu May 1 13:55:46 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 1 May 2025 13:55:46 GMT Subject: RFR: 8356021: Use Double::hashCode in java.util.Locale::hashCode In-Reply-To: References: Message-ID: On Wed, 30 Apr 2025 18:01:08 GMT, Shaojin Wen wrote: > Similar to #24959, java.util.Locale.hashCode can also make the same improvement. > > Replace manual bitwise operations in hashCode implementations of java.util.Locale with Double::hashCode. lgltm ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/24971#pullrequestreview-2809829827 From swen at openjdk.org Thu May 1 15:49:53 2025 From: swen at openjdk.org (Shaojin Wen) Date: Thu, 1 May 2025 15:49:53 GMT Subject: Integrated: 8356021: Use Double::hashCode in java.util.Locale::hashCode In-Reply-To: References: Message-ID: On Wed, 30 Apr 2025 18:01:08 GMT, Shaojin Wen wrote: > Similar to #24959, java.util.Locale.hashCode can also make the same improvement. > > Replace manual bitwise operations in hashCode implementations of java.util.Locale with Double::hashCode. This pull request has now been integrated. Changeset: 2ad639f1 Author: Shaojin Wen URL: https://git.openjdk.org/jdk/commit/2ad639f1b33fcd8e218e8ad549caf32024a36cb2 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod 8356021: Use Double::hashCode in java.util.Locale::hashCode Reviewed-by: rriggs, liach ------------- PR: https://git.openjdk.org/jdk/pull/24971 From naoto at openjdk.org Thu May 1 16:29:50 2025 From: naoto at openjdk.org (Naoto Sato) Date: Thu, 1 May 2025 16:29:50 GMT Subject: RFR: 8356021: Use Double::hashCode in java.util.Locale::hashCode In-Reply-To: References: Message-ID: On Wed, 30 Apr 2025 18:01:08 GMT, Shaojin Wen wrote: > Similar to #24959, java.util.Locale.hashCode can also make the same improvement. > > Replace manual bitwise operations in hashCode implementations of java.util.Locale with Double::hashCode. Thanks for the fix. Even though the fix is trivial and small, please keep the PR open at least for 24 hours so that every region of the globe can see the fix. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24971#issuecomment-2845189930 From swen at openjdk.org Thu May 1 18:16:50 2025 From: swen at openjdk.org (Shaojin Wen) Date: Thu, 1 May 2025 18:16:50 GMT Subject: RFR: 8356021: Use Double::hashCode in java.util.Locale::hashCode In-Reply-To: References: Message-ID: <9DKNGgorVgpZOig2AsE3iVx3ZsexlX9r7WDTbBsY6lA=.8b79a8b2-4a61-4d66-99ab-a254adb09fb0@github.com> On Thu, 1 May 2025 16:27:17 GMT, Naoto Sato wrote: >> Similar to #24959, java.util.Locale.hashCode can also make the same improvement. >> >> Replace manual bitwise operations in hashCode implementations of java.util.Locale with Double::hashCode. > > Thanks for the fix. Even though the fix is trivial and small, please keep the PR open at least for 24 hours so that every region of the globe can see the fix. @naotoj Thank you for your reminder. There is a problem with GitHub's prompt. It shows yesterday in less than 24 hours. I will avoid this problem next time. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24971#issuecomment-2845399910 From jlu at openjdk.org Fri May 2 15:53:22 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 2 May 2025 15:53:22 GMT Subject: RFR: 8356040: java/util/PluggableLocale/LocaleNameProviderTest.java timed out Message-ID: Please review this PR which reduces the amount of combinations tested by `LocaleNameProviderTest`. This test was exhaustively testing over 1000x1000 `Locale` combinations which was expensive and caused a timeout in tier 5. Narrowing down the tested locales to Japanese language ones can reduce our tested input to 9x9 and provides most of the same value the test previously did. (Since our SPI provider has defined preferred Japanese Locale name values.) This change also refactors the test to use JUnit. The test now runs around ~20 times faster. Most of the diff is attributed to separating the method source from the test itself. But notice the filtering of `Locale`s done on `availloc` and `jreImplLoc`. ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/25009/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25009&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8356040 Stats: 132 lines in 1 file changed: 63 ins; 48 del; 21 mod Patch: https://git.openjdk.org/jdk/pull/25009.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/25009/head:pull/25009 PR: https://git.openjdk.org/jdk/pull/25009 From naoto at openjdk.org Fri May 2 17:18:51 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 2 May 2025 17:18:51 GMT Subject: RFR: 8356040: java/util/PluggableLocale/LocaleNameProviderTest.java timed out In-Reply-To: References: Message-ID: On Fri, 2 May 2025 15:49:03 GMT, Justin Lu wrote: > Please review this PR which reduces the amount of combinations tested by `LocaleNameProviderTest`. > > This test was exhaustively testing over 1000x1000 `Locale` combinations which was expensive and caused a timeout in tier 5. Narrowing down the tested locales to Japanese language ones can reduce our tested input to 9x9 and provides most of the same value the test previously did. (Since our SPI provider has defined preferred Japanese Locale name values.) This change also refactors the test to use JUnit. The test now runs around ~20 times faster. > > Most of the diff is attributed to separating the method source from the test itself. But notice the filtering of `Locale`s done on `availloc` and `jreImplLoc`. Looks good. test/jdk/java/util/PluggableLocale/LocaleNameProviderTest.java line 61: > 59: * This is not an exhaustive test. Such a test would require iterating (1000x1000)+ > 60: * inputs. Instead, we check against Japanese lang locales which guarantees > 61: * we will run into cases where the CLDR is not preferred and the SPI has defined It would be helpful to mention why CLDR is not the preferred provider (as the SPI impl has variants of the Japanese locale) test/jdk/java/util/PluggableLocale/LocaleNameProviderTest.java line 92: > 90: String jresctry = null; > 91: String jresvrnt = null; > 92: if (!lang.equals("")) { Can be replaced with `isEmpty()` ------------- PR Review: https://git.openjdk.org/jdk/pull/25009#pullrequestreview-2812517069 PR Review Comment: https://git.openjdk.org/jdk/pull/25009#discussion_r2071912893 PR Review Comment: https://git.openjdk.org/jdk/pull/25009#discussion_r2071918059 From jlu at openjdk.org Fri May 2 17:39:08 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 2 May 2025 17:39:08 GMT Subject: RFR: 8356040: java/util/PluggableLocale/LocaleNameProviderTest.java timed out [v2] In-Reply-To: References: Message-ID: > Please review this PR which reduces the amount of combinations tested by `LocaleNameProviderTest`. > > This test was exhaustively testing over 1000x1000 `Locale` combinations which was expensive and caused a timeout in tier 5. Narrowing down the tested locales to Japanese language ones can reduce our tested input to 9x9 and provides most of the same value the test previously did. (Since our SPI provider has defined preferred Japanese Locale name values.) This change also refactors the test to use JUnit. The test now runs around ~20 times faster. > > Most of the diff is attributed to separating the method source from the test itself. But notice the filtering of `Locale`s done on `availloc` and `jreImplLoc`. Justin Lu has updated the pull request incrementally with one additional commit since the last revision: Naoto review - update comment, isEmpty() ------------- Changes: - all: https://git.openjdk.org/jdk/pull/25009/files - new: https://git.openjdk.org/jdk/pull/25009/files/c3e77cde..579c1ebe Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=25009&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25009&range=00-01 Stats: 6 lines in 1 file changed: 1 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/25009.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/25009/head:pull/25009 PR: https://git.openjdk.org/jdk/pull/25009 From naoto at openjdk.org Fri May 2 18:42:45 2025 From: naoto at openjdk.org (Naoto Sato) Date: Fri, 2 May 2025 18:42:45 GMT Subject: RFR: 8356040: java/util/PluggableLocale/LocaleNameProviderTest.java timed out [v2] In-Reply-To: References: Message-ID: On Fri, 2 May 2025 17:39:08 GMT, Justin Lu wrote: >> Please review this PR which reduces the amount of combinations tested by `LocaleNameProviderTest`. >> >> This test was exhaustively testing over 1000x1000 `Locale` combinations which was expensive and caused a timeout in tier 5. Narrowing down the tested locales to Japanese language ones can reduce our tested input to 9x9 and provides most of the same value the test previously did. (Since our SPI provider has defined preferred Japanese Locale name values.) This change also refactors the test to use JUnit. The test now runs around ~20 times faster. >> >> Most of the diff is attributed to separating the method source from the test itself. But notice the filtering of `Locale`s done on `availloc` and `jreImplLoc`. > > Justin Lu has updated the pull request incrementally with one additional commit since the last revision: > > Naoto review - update comment, isEmpty() LGTM. Thanks for simplifying the test ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/25009#pullrequestreview-2812676717 From jlu at openjdk.org Fri May 2 20:55:54 2025 From: jlu at openjdk.org (Justin Lu) Date: Fri, 2 May 2025 20:55:54 GMT Subject: RFR: 8356096: ISO 4217 Amendment 179 Update Message-ID: Please review this PR which implements ISO 4217 update 179. The _Arab Accounting Dinar_ currency is added under an _agency_, (not _country_) entity. As a result it is not added as an entry in the country to currency mapping in `currencyData.properties`. It has a numeric code of 396, and minor units of 2 (so it is not added to any of the `minorX` entries in `currencyData.properties`). ------------- Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/25014/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25014&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8356096 Stats: 11 lines in 4 files changed: 2 ins; 0 del; 9 mod Patch: https://git.openjdk.org/jdk/pull/25014.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/25014/head:pull/25014 PR: https://git.openjdk.org/jdk/pull/25014 From duke at openjdk.org Sun May 4 19:45:56 2025 From: duke at openjdk.org (duke) Date: Sun, 4 May 2025 19:45:56 GMT Subject: Withdrawn: 8349189: Speed up DateTime parse & format via Class File API In-Reply-To: References: Message-ID: On Fri, 31 Jan 2025 10:29:53 GMT, Shaojin Wen wrote: > By using the Class File API to dynamically generate a CompositePrinterParser, and defining DateTimePrinterParser[] printerParsers as a specific field, C2 can do TypeProfile optimization. > > Since the CompositePrinterParser is generated based on the pattern, we can make the following optimizations: > > 1. For example, for the parse and print of Month/DayOfMonth/Hour/Minute/Second with a fixed length of 2, do targeted parse and print optimization. > > 2. Parse uses LocalDate/LocalTime/LocalDateTime/OffsetDateTime for TemporalQuery to avoid the overhead of constructing DateTimeParseContext. > > These optimizations can significantly improve performance, with more than 100% performance improvement in many scenarios. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/23384 From jlu at openjdk.org Mon May 5 16:45:51 2025 From: jlu at openjdk.org (Justin Lu) Date: Mon, 5 May 2025 16:45:51 GMT Subject: Integrated: 8356040: java/util/PluggableLocale/LocaleNameProviderTest.java timed out In-Reply-To: References: Message-ID: On Fri, 2 May 2025 15:49:03 GMT, Justin Lu wrote: > Please review this PR which reduces the amount of combinations tested by `LocaleNameProviderTest`. > > This test was exhaustively testing over 1000x1000 `Locale` combinations which was expensive and caused a timeout in tier 5. Narrowing down the tested locales to Japanese language ones can reduce our tested input to 9x9 and provides most of the same value the test previously did. (Since our SPI provider has defined preferred Japanese Locale name values.) This change also refactors the test to use JUnit. The test now runs around ~20 times faster. > > Most of the diff is attributed to separating the method source from the test itself. But notice the filtering of `Locale`s done on `availloc` and `jreImplLoc`. This pull request has now been integrated. Changeset: 32f67a3e Author: Justin Lu URL: https://git.openjdk.org/jdk/commit/32f67a3e38be807164435ea0841c01d2b7c73652 Stats: 133 lines in 1 file changed: 64 ins; 48 del; 21 mod 8356040: java/util/PluggableLocale/LocaleNameProviderTest.java timed out Reviewed-by: naoto ------------- PR: https://git.openjdk.org/jdk/pull/25009 From naoto at openjdk.org Mon May 5 17:22:45 2025 From: naoto at openjdk.org (Naoto Sato) Date: Mon, 5 May 2025 17:22:45 GMT Subject: RFR: 8356096: ISO 4217 Amendment 179 Update In-Reply-To: References: Message-ID: On Fri, 2 May 2025 20:51:31 GMT, Justin Lu wrote: > Please review this PR which implements ISO 4217 update 179. > > The _Arab Accounting Dinar_ currency is added under an _agency_, (not _country_) entity. As a result it is not added as an entry in the country to currency mapping in `currencyData.properties`. It has a numeric code of 396, and minor units of 2 (so it is not added to any of the `minorX` entries in `currencyData.properties`). LGTM ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/25014#pullrequestreview-2815515425 From iris at openjdk.org Mon May 5 17:31:45 2025 From: iris at openjdk.org (Iris Clark) Date: Mon, 5 May 2025 17:31:45 GMT Subject: RFR: 8356096: ISO 4217 Amendment 179 Update In-Reply-To: References: Message-ID: On Fri, 2 May 2025 20:51:31 GMT, Justin Lu wrote: > Please review this PR which implements ISO 4217 update 179. > > The _Arab Accounting Dinar_ currency is added under an _agency_, (not _country_) entity. As a result it is not added as an entry in the country to currency mapping in `currencyData.properties`. It has a numeric code of 396, and minor units of 2 (so it is not added to any of the `minorX` entries in `currencyData.properties`). Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/25014#pullrequestreview-2815543817