JDK-8224996 : Investigate memory access C2 optimizations
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang.foreign
  • Affected Version: repo-panama
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2019-05-29
  • Updated: 2022-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-panamaUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
The var-handle based memory access API is currently slower than a plain Unsafe access. This seems to be caused by two factors:

* the JIT has trouble in hoisting Scope liveness checks outside a loop

* when addresses are non-constant (e.g. because memory is allocated and accessed inside a try-with-resources), it seems like bound checks are also not optimized.