JNI Performance

后端 未结 3 1986
暗喜
暗喜 2021-02-11 07:05

Our main program is in java but the code that extracts our data from storage is written in C. I need to build an HDF5 file from extracted data. Would it be better to use JNI to

3条回答
  •  生来不讨喜
    2021-02-11 07:27

    I'm not familiar at all with the HDF interfaces other than the C one, so I cannot really compare for you.

    I would point out that this is the API which all other interfaces use, so if you're finding that you need to eek out the maximum performance then the C API is going to be the best.

    There is also a question about what parts of the API are available to you. For example I originally started with the C++ interface. Some APIs were still only available in the C API. This is not a problem when you're using C & C++ but it may be a problem if an API you need is not available to you.

    Having said that, you do need to have your head screwed on in terms of the object model of C: eg. use of pointers, handles etc.

提交回复
热议问题