Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 958403

Pages: 1
Gernot
Unregistered




JNI performance
      #1121 - 08/20/03 02:50 AM

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.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Jeff Smith
Unregistered




Re: JNI performance [Re: Gernot]
      #1139 - 08/20/03 02:42 PM

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.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Fabricio Sanchez
Unregistered




Re: JNI performance [Re: Jeff Smith]
      #2898 - 10/15/03 05:23 AM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 11061

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5