Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.straub-nv.de!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: JNA performance Date: Sun, 08 May 2011 07:58:40 -0400 Organization: albasani.net Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net jB/UmcROrYNKmT0ZINSlWTa140jqxaIqHQjLZFohWH35xjchOzS4bqfipBnIB5RtKRYKvyH6hIIsS1mcc3EWAQ== NNTP-Posting-Date: Sun, 8 May 2011 11:58:38 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="Y6FY2rSjUIPJi2IsI3efJFioxbyZ1IWE37+YjN8l53TWobBbsL9BgJIW1KPKa2gjduo8HWZovVxqZ7xY0zBPW4bWv/dLomDwacVUMjIbImI22F+HF0svUJJtfzbHafHw"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 In-Reply-To: Cancel-Lock: sha1:ZPd2H89oVX2CEoDlDtUw2OYcoSk= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3806 On 05/08/2011 01:35 AM, Qu0ll wrote: > I am about to do some Java programming involving native libraries so can > anyone comment on their experiences with the performance of JNA? I note the > following (somewhat concerning) statement from the JNA website: > > "While some attention is paid to performance, correctness and ease of use take > priority." > > I guess there's little point in using it if it sucks performance-wise even if > it is "easy to use"! I have never used JNI either but it looks not so "easy to > use" (i.e. requires some C programming). Using JNA or JNI for performance is likely to be a fool's errand. What is the performance of your non-JNA approach? How much better does it need to be? Why do you think that calls to non-native libraries are the bottleneck? Also, where do you get the notion that JNA "sucks performance-wise"? The JNA folks claim that "some attention is paid to performance". That indicates /a priori/ that performance is likely not to "suck". Therefore any conclusion you made that they failed in that attention is based on measurement. What measurements did you perform, what were the results, and what do you need the results to be? -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg