Hi, how is this meant? Does binary compatibility with Java 1.4 still needed?
I've noticed that the method Function#isVarArgs is using reflection to call Method#isVarArgs. This is very slow compared to calling the method directly (if Java 1.5 is fully supported).
But even if Java 1.4 still has to be supported, there are ways to improve on performance and memory consumption. I tested buffering the reference to the Method#isVarArgs method into a static variable:
https://github.com/Boereck/jna/commit/0abab9938b11669d72516fdbc9302a5132646a6fIn my test runs I got huge memory savings and a considerable performance gain.