Linked Questions

13 votes
4 answers
2k views

Possible Duplicate: What makes JNI calls slow? First let me say that this questions is born more out of curiosity than real necessity. I'm curious to know what is the overhead in doing a JNI call ...
pcalcao's user avatar
  • 16k
0 votes
1 answer
432 views

I'm reading the article here: http://www.kdgregory.com/?page=java.byteBuffer On that page, there is this section: In fact, the only reason that I can see for using direct buffers in a pure Java ...
soeske18's user avatar
  • 125
107 votes
7 answers
87k views

I want to create a new array of objects putting together two smaller arrays. They can't be null, but size may be 0. I can't chose between these two ways: are they equivalent or is one more efficient ...
Daren's user avatar
  • 3,447
74 votes
3 answers
28k views

Based on performance alone, approximately how many "simple" lines of java is the equivalent performance hit of making a JNI call? Or to try to express the question in a more concrete way, if a simple ...
Bohemian's user avatar
  • 428k
19 votes
3 answers
5k views

I recently came across this interesting term and searched on Net to know more about it. However the info I found is sketchy. Could someone pl. give me a somewhat detailed explanation of what this is ...
shrini1000's user avatar
  • 7,256
9 votes
4 answers
5k views

Yesterday I saw a question asking why Math.pow(int,int) is so slow, but the question was poorly worded and showed no research effort, so it was quickly closed. I did a little test of my own and found ...
Woodrow Barlow's user avatar
11 votes
1 answer
3k views

I'm developing a JNI implementation similar to sun.misc.Unsafe but with extended memory management. Why are the call times of native methods from sun.misc.Unsafe and from my developed library ...
yuriyo's user avatar
  • 111
6 votes
3 answers
3k views

I am currently creating a backup application where we need a way to read files that are in use by other applications and we also want to minimize the locking the we incur on the users' files. Using ...
Yrlec's user avatar
  • 3,458
7 votes
2 answers
2k views

I've read from several other reports that people generally get around 4-80 ns on a plain, basic JNI call: From What makes JNI calls slow? For trivial native methods, last year I found calls to ...
bgroenks's user avatar
  • 1,899
6 votes
1 answer
749 views

Are there any performance implications when calling machine code from Java's bytecode? Since machine code is "unmanaged", and it is not "aware" of Java's internals, maybe this causes JVM's internal ...
akonsu's user avatar
  • 29.7k
1 vote
4 answers
9k views

In java, what is the FASTEST way to convert a substring to an integer WITHOUT USING Integer.parseInt? I want to know if there is a way to avoid parseInt because it requires I make a temporary string ...
johnnycrash's user avatar
  • 5,384
3 votes
5 answers
3k views

I am implementing the factory pattern in my code, so came across one interesting thing in factory that I can replace the if else condition in the factory method with Reflection to make my code more ...
Girish's user avatar
  • 1,717
4 votes
3 answers
1k views

To see if I can really take any benefit of native code (written C) by using JNI (instead of writing complete java application), I want to measure overhead of calling through JNI. What is the best way ...
gpuguy's user avatar
  • 4,717
1 vote
1 answer
1k views

I need to call a RPC client which is implemented in C from a Java class. The interaction is one way only(i.e) Java has to invoke specific functions in C, while C need not return anything to the ...
Pravin's user avatar
  • 21
1 vote
1 answer
619 views

As part of one of my CS classes, I have to write a matrix class in Java, with some methods implemented in Java as well as C++ via the Java Native Interface and measure the difference in execution time....
Axim's user avatar
  • 332

15 30 50 per page