On Thu, 7 Aug 2025 16:23:00 GMT, Chen Liang <li...@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.

This pull request has now been integrated.

Changeset: e13b4c8d
Author:    Chen Liang <li...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/e13b4c8de944ab14a1d12f6251e83f4fdd9e0198
Stats:     75 lines in 2 files changed: 69 ins; 5 del; 1 mod

8358535: Changes in ClassValue (JDK-8351996) caused a 1-9% regression in 
Renaissance-PageRank

Reviewed-by: jrose, shade

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

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

Reply via email to