This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CNI vs JNI in performance?


Hi Michael,

>>>>I've browsed the archives, but cannot find the answer:
>>>>Which is the better to use: CNI or JNI?
>>>>This is regarding rapid invocations from Java (for talking with a
>>>>rs485-device) transferring byte-arrays back and forth...
>>>>I was wondering which method has the most overhead, etc...
>>>CNI is the one with less overhead, its just not so portable as
>>>only gcj/g++ support it yet. "Portability" is the domain of JNI
>>>for now.
>>And this is with respect to both speed and memory?
> I never measured memory usage but I guess CNI is better there. JNI is
> surely slow like hell compared to CNI. And CNI is easier to write and
> maintain afaik.
Ok - you've made my curious enough for trying - I'll try to remember to post the results when I get to it...


// Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]