RFR: 8358535: Changes in ClassValue (JDK-8351996) caused a 1-9% regression in Renaissance-PageRank
Aleksey Shipilev
shade at openjdk.org
Fri Aug 8 09:43:15 UTC 2025
On Thu, 7 Aug 2025 16:23:00 GMT, Chen Liang <liach at openjdk.org> wrote:
> JDK-8351996, PR #24043, updated java.lang.ClassValue, but accidentally missed a piece of cache refresh code that is meaningful when the cache is speculatively invalidated by `remove` calls.
>
> This caused a significant regression in the [PageRank](https://github.com/renaissance-benchmarks/renaissance/blob/master/benchmarks/apache-spark/src/main/scala/org/renaissance/apache/spark/PageRank.scala) benchmark, primarily because Scala array creation like `Array.fill` uses `scala.reflect.ClassTag` which uses `ClassValue`, making `ClassValue.get` a hot code path for every array creation.
Looks reasonable to me, thanks! This would need to be eventually backported to JDK 25u.
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26679#pullrequestreview-3100145422
More information about the core-libs-dev
mailing list