Given your use case, JNI will not be faster than JNA.
What is expensive for Java native interaction is the transfer of large amounts of memory. In particular, it can be very expensive to make Java memory available to native code; IIRC is partly because Java can choose a memory segment, but it loves, but native code will expect continuous chunks of memory - moving / copying memory takes some time.
If you are concerned about performance, you should make sure that your JNA code uses "direct" style access rather than the original interface style.
In addition, if you need to transfer large amounts of memory between Java and native code, you should consider using one initial direct allocation (if possible) and not reallocate this memory on a regular basis. Thus, you pay the distribution cost only once and at the beginning, therefore, for a large number of calls, the cost of which becomes insignificant.
source share