RFR: 8318709: Improve System.nanoTime performance on Windows [v2]

Daniel Jeliński djelinski at openjdk.org
Thu Oct 26 07:25:48 UTC 2023


> - use LARGE_INTEGER.QuadPart instead of assembling the jlong from high/low parts
> - precalculate counts_per_nano to avoid costly floating-point division in counter to nanosecond conversion
> 
> Benchmark before:
> SystemTime.nanoTime                avgt   15  19,366 � 0,383  ns/op
> 
> After:
> SystemTime.nanoTime                avgt   15  15,812 � 0,385  ns/op
> 
> Tier1-2 clean.

Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:

  Fix variable name

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16336/files
  - new: https://git.openjdk.org/jdk/pull/16336/files/50bf0dd3..4ba32be1

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

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

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


More information about the hotspot-runtime-dev mailing list