performance impact of JNI GetCritical*
Clemens Eisserer
linuxhippy at gmail.com
Thu Mar 18 21:02:29 UTC 2010
> If JNI CS
> are very short-lived and infrequent and the arrays are as small as 12 bytes,
> the difference would likely be negligible. As frequency of use (and degree
> of concurrent use) and/or array size increases, NIO would likely become
> increasingly better than JNI CS (in JDK 7 at least). At least that's my
> hunch.
I fear in the case of JOGL the problem is frequent JNI-CS with small arrays.
So basically you do very little work per JNI-CS, thus the
CS-enter/leave overhead is higher than with larger arrays. Best would
probably to use NIO-Buffers directly, which would remove
copy-overhead.
- Clemens
More information about the hotspot-gc-dev
mailing list