This discussion is archived
3 Replies Latest reply: May 7, 2013 3:15 PM by 987671 RSS

jni vs native

987671 Newbie
Currently Being Moderated
How slower jni compare to native cpp implementation ? It would be great if there is some performance statistic available.
  • 1. Re: jni vs native
    userBDBDMS Guru Moderator
    Currently Being Moderated
    Unfortunately, we do not done measurements in this area. We have found that this type of decision is really decided based on what the background is of the application developers. If you are a java shop, then go with java through the jni interface and if you are a C/C++ then go with those as the API.
  • 2. Re: jni vs native
    dsegleau Newbie
    Currently Being Moderated
    Any benchmarking results would be very application-specific. It would depend very heavily on how many API calls are being made across JNI, how much data is being passed in those API calls, how much I/O is occurring and what other functionality is part of the application code. Event an attempt to say "on average, a JNI API call is X% slower than the equivalent CPP API call" would result in having X% be completely invalid for many kinds of applications with different characteristics.

    As stated in the other post, most customers choose the API based on their application development requirements and experience, not based on raw performance estimates.
  • 3. Re: jni vs native
    987671 Newbie
    Currently Being Moderated
    I've made my research and as a result JNI is 2 times slower than native c++ implementation.
    For purposes of my application I've tested only read performance for the same database (generated using JNI) and same amount of data loaded in the same order.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points