-
Bug
-
Resolution: Unresolved
-
P3
-
25
-
None
The performance of FFM getInt and putInt is significantly low compared to Unsafe getInt and putInt.
Attaching programs that print the time taken by these methods, with FFM and Unsafe.
The programs perform 100_000_000 put and get calls and prints the total time in ms.
Output of the programs with JDK 24 and 25 are as:
JDK 24.0.1+9
FFM getInt() time: 25.182ms
Unsafe.getInt() time: 5.740ms
FFM putInt() time: 43.266ms
Unsafe.putInt() time: 6.169ms
JDK 25-ea+30
FFM getInt() time: 17.230ms
Unsafe.getInt() time: 5.977ms
FFM putInt() time: 22.364ms
Unsafe.putInt() time: 6.460ms
The performance is improved with 25 compared to 24.0.1
Attaching programs that print the time taken by these methods, with FFM and Unsafe.
The programs perform 100_000_000 put and get calls and prints the total time in ms.
Output of the programs with JDK 24 and 25 are as:
JDK 24.0.1+9
FFM getInt() time: 25.182ms
Unsafe.getInt() time: 5.740ms
FFM putInt() time: 43.266ms
Unsafe.putInt() time: 6.169ms
JDK 25-ea+30
FFM getInt() time: 17.230ms
Unsafe.getInt() time: 5.977ms
FFM putInt() time: 22.364ms
Unsafe.putInt() time: 6.460ms
The performance is improved with 25 compared to 24.0.1