Skip to content

Conversation

@Spencer-Comin
Copy link

This commit adds benchmarks for all the Unsafe get and set methods of the form Unsafe.[Operation][Data Type][Memory Semantics] accessing values in object members, static class fields, arrays, and native memory. The benchmark names have the form

UnsafeBench.[Operation].[Data Type].[Memory Semantics].[Location Type]

where:

Operation is one of

  • Put
  • Get

Data Type is one of

  • Boolean
  • Byte
  • Char
  • Double
  • Float
  • Int
  • Long
  • Reference
  • Short

Memory Semantics is one of

  • Acquire
  • Release
  • Opaque
  • Volatile
  • Plain

Location Type is one of

  • ObjectMember
  • StaticField
  • Array
  • NativeAddress

Notes:

  • There are no Reference NativeAddress benchmarks
  • There are only Get Acquire benchmarks
  • There are only Put Release benchamrks
  • These benchmarks require adding the flag "--add-exports java.base/jdk.internal.misc=ALL-UNNAMED"

This commit adds benchmarks for all the Unsafe get and set methods of
the form Unsafe.[Operation][Data Type][Memory Semantics] accessing
values in object members, static class fields, arrays, and native
memory. The benchmark names have the form

UnsafeBench.[Operation].[Data Type].[Memory Semantics].[Location Type]

where:

Operation is one of
  - Put
  - Get

Data Type is one of
  - Boolean
  - Byte
  - Char
  - Double
  - Float
  - Int
  - Long
  - Reference
  - Short

Memory Semantics is one of
  - Acquire
  - Release
  - Opaque
  - Volatile
  - Plain

Location Type is one of
  - ObjectMember
  - StaticField
  - Array
  - NativeAddress

Notes:
  - There are no Reference NativeAddress benchmarks
  - There are only Get Acquire benchmarks
  - There are only Put Release benchamrks
  - These benchmarks require adding the flag "--add-exports java.base/jdk.internal.misc=ALL-UNNAMED"

Signed-off-by: Spencer Comin <spencer.comin@ibm.com>
@karianna karianna requested a review from smlambert May 12, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant