<i18n dev> RFR: 8345668: ZoneOffset.ofTotalSeconds performance regression [v2]
Naoto Sato
naoto at openjdk.org
Fri Dec 20 20:58:22 UTC 2024
> 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.
Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
Update src/java.base/share/classes/java/time/ZoneOffset.java
Co-authored-by: Roger Riggs <Roger.Riggs at Oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22854/files
- new: https://git.openjdk.org/jdk/pull/22854/files/3df7e9f1..1e09b8be
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22854&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22854&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/22854.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22854/head:pull/22854
PR: https://git.openjdk.org/jdk/pull/22854
More information about the i18n-dev
mailing list