RFR: 8353175: Eliminate double iteration of stream in FieldDescriptor reinitialization [v2]

Radim Vansa rvansa at openjdk.org
Fri Mar 28 12:02:58 UTC 2025


> On the reproducer https://bugs.openjdk.org/secure/attachment/113985/CCC.java my local testing shows these numbers:
> 
> ### JDK-17
> 
> $ hyperfine -w 5 -r 10 '/path/to/jdk-17/bin/java -cp /tmp/ CCC'
> Benchmark 1: /path/to/jdk-17/bin/java -cp /tmp/ CCC
>   Time (mean ± σ):      32.5 ms ±   0.9 ms    [User: 27.5 ms, System: 10.6 ms]
>   Range (min … max):    31.1 ms …  33.7 ms    10 runs
> 
> ### JDK-25 before the change applied
> 
> $ hyperfine -w 5 -r 10 '/path/to/jdk-25/build/linux-x86_64-server-release/images/jdk/bin/java -cp /tmp/ CCC'
> Benchmark 1: /path/to/jdk-25/build/linux-x86_64-server-release/images/jdk/bin/java -cp /tmp/ CCC
>   Time (mean ± σ):     101.6 ms ±   1.5 ms    [User: 96.8 ms, System: 14.6 ms]
>   Range (min … max):    99.0 ms … 104.5 ms    10 runs
> 
> ### JDK-25 with this patch
> 
> $ hyperfine -w 5 -r 10 '/path/to/jdk-25/build/linux-x86_64-server-release/images/jdk/bin/java -cp /tmp/ CCC'
> Benchmark 1: /path/to/jdk-25/build/linux-x86_64-server-release/images/jdk/bin/java -cp /tmp/ CCC
>   Time (mean ± σ):      75.8 ms ±   1.2 ms    [User: 69.8 ms, System: 16.0 ms]
>   Range (min … max):    73.8 ms …  78.2 ms    10 runs

Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:

  Fix compilation error in assertion

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24290/files
  - new: https://git.openjdk.org/jdk/pull/24290/files/c4c5944a..11c2cb69

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24290&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24290&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/24290.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24290/head:pull/24290

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


More information about the hotspot-dev mailing list