3 Replies Latest reply on May 7, 2013 10:15 PM by 987671

    jni vs native

      How slower jni compare to native cpp implementation ? It would be great if there is some performance statistic available.
        • 1. Re: jni vs native
          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
            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
              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.