JNI-performance - Is it really that fast?
popeyelin at gmail.com
Fri Mar 21 13:55:19 PDT 2008
You can look at the BerkeleyDB's JNI wrapper edition(not Java Edition), it's
almost as fast as its c edition from my experience. I use both of them in
On Fri, Mar 21, 2008 at 5:25 AM, Clemens Eisserer <linuxhippy at gmail.com>
> I did some benchmarks to evaluate JNI-call-per-operation vs.
> Command-batch-buffer performance for a design where low per-primitive
> overhead is important.
> I was totally impressed about the low overhead JNI has in modern
> SUN-JVMs. On my Core2Duo-2ghz it took only 35cycles to call a native
> method with 4 jint parameters and count an int-loop-counter up, 58mio
> times per second. Making the methods synchronized however time went up
> to 100 cycles per call.
> Has JNI really become that fast, or is it likely that I have hit a
> microbenchmark trap?
> I thought JDK6 has BiasedLocking (I only tested single threaded), why
> is synchronization so expensive in this case? (my call-graph is
> benchmark-loop -> (synchronized) accessor-method -> native-method).
> Thanks, lg Clemens
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the discuss