<i18n dev> Integrated: 8345668: ZoneOffset.ofTotalSeconds performance regression

Naoto Sato naoto at openjdk.org
Mon Jan 6 17:06:43 UTC 2025


On Fri, 20 Dec 2024 19:55:06 GMT, Naoto Sato <naoto at openjdk.org> wrote:

> The change made in [JDK-8288723](https://bugs.openjdk.org/browse/JDK-8288723) seems innocuous, but it caused this performance regression. Partially reverting the change (ones that involve `computeIfAbsent()`) to the original. Provided a benchmark that iterates the call to `ZoneOffset.ofTotalSeconds(0)` 1,000 times, which improves the operation time from 3,946ns to 2,241ns.

This pull request has now been integrated.

Changeset: 9a60f445
Author:    Naoto Sato <naoto at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/9a60f4457bb56d0f5039a97e6b943e62a8a2c3ee
Stats:     31 lines in 3 files changed: 22 ins; 0 del; 9 mod

8345668: ZoneOffset.ofTotalSeconds performance regression

Reviewed-by: rriggs, aturbanov

-------------

PR: https://git.openjdk.org/jdk/pull/22854


More information about the i18n-dev mailing list