Gernot
Unregistered
|
|
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.
|
Jeff Smith
Unregistered
|
|
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.
|
Fabricio Sanchez
Unregistered
|
|
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.
|