**DONOTDELETE**
(Unregistered)
08/20/03 02:50 AM
JNI performance

did you make some performance tests ? AFAIK JNI accesses are much more slow than accesses handled by the VM. Some speed you gain by native calculation is countervailed by the JNI access.

**DONOTDELETE**
(Unregistered)
08/20/03 02:42 PM
Re: JNI performance

Yes, I ran some benchmarks. My math benchmark required 24.5 seconds in J2SE 1.4 to run. Using JNI, it ran in about 7 seconds.

**DONOTDELETE**
(Unregistered)
10/15/03 05:23 AM
Re: JNI performance

I tried using the JNI, Math and StrictMath to calculate a loop of 1000 runs of cos( 0.133 ). This is how long the 1000 runs took, in seconds:
JNI (2.293), Math (2.160), StrictMath (2.160) using j2sdk1.4.2_01 and Visual C++ for the dll.
May be sun has managed to improve the speed of its Math/StrictMath classes, as the JNI looked a little slower than the others.
Does anybody know what's going on?
Thanx,
Fabricio.



Contact us JavaWorld

Powered by UBB.threads™ 6.5.5

Featured White Papers


RESEARCH CENTERS: Java Standard Edition | Java Enterprise Edition | Java Micro Edition | Development Tools
About Us | Advertise | Contact Us | Terms of Service/Privacy
Copyright, 2006-2008 Network World, Inc. All rights reserved.