Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261828

Foreign Linker API: Java to native String conversion is slower than in JNI

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None
    • Environment:

      Windows 10, JDK 16 EA, 64 Bit

      Description

      A target of the new foreign linker API was that it is AT LEAST AS FAST AS JNI. A quick JMH based benchmark (invoking the exact same Windows 10 Kernel32.dll function either by JNI or by FLA) proofs that this target was not reached even close with the current incubator of FLA:

      MyDriver.fla thrpt 25 2722574,757 ± 126216,510 ops/s
      MyDriver.jni thrpt 25 7549849,915 ± 67011,939 ops/s

      JNI could invoke the Kernel32.dll function 7.5 Million times per second. Foreign Linker API just 2.7 Million times.

      Hence, the target is missed BY SUCH FAR that it is to be treated as a bug.

        Attachments

          Activity

            People

            Assignee:
            mcimadamore Maurizio Cimadamore
            Reporter:
            mkarg Markus Karg
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: