Minimal changes required to implement Foreign Function and Memory API by stroomdev66 · Pull Request #258 · lmdbjava/lmdbjava
This PR represents the most minimal changes required to migrate LmdbJava to use the new Java 25 Foreign Function and Memory API and remove Unsafe. From a user perspective there is very little API change other than the requrement to use a memory Arena in some places.
At present the performance lags behind the previous version by about 30% in many scenarios. This is down to two things:
- The fundamental Java FFM API appears to be a small percentage slower.
- The removal of Unsafe has resulted in the need for additional object creation rather than the ability to constantly reuse buffers and repoint addresses.
We are in the process of addressing some of these issues and improving some other areas of the codebase to compensate.