Linked Questions
19 questions linked to/from What makes JNI calls slow?
13
votes
4
answers
2k
views
Overhead of a Java JNI call [duplicate]
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 ...
0
votes
1
answer
432
views
Disadvantage of a JNI call? [duplicate]
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 ...
107
votes
7
answers
87k
views
Is it better to use System.arraycopy(...) than a for loop for copying arrays?
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 ...
74
votes
3
answers
28k
views
What is the quantitative overhead of making a JNI call?
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 ...
19
votes
3
answers
5k
views
Java: what is JITC's reflection inflation?
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 ...
9
votes
4
answers
5k
views
Why is Math.pow(int,int) slower than my naive implementation?
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 ...
11
votes
1
answer
3k
views
Why are JNI calls to native methods slower than similar methods in sun.misc.Unsafe?
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 ...
6
votes
3
answers
3k
views
Volume Shadow Copy using Java
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 ...
7
votes
2
answers
2k
views
Java JNI calls are slower than expected (at least 2 ms/call)
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 ...
6
votes
1
answer
749
views
Does JVM halt when calling native code?
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 ...
1
vote
4
answers
9k
views
Best way to convert a SUBSTRING to integer in java
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 ...
3
votes
5
answers
3k
views
Make factory method more dynamic
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 ...
4
votes
3
answers
1k
views
Measuring overhead of calling through JNI
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 ...
1
vote
1
answer
1k
views
JNI or Runtime.exec()?
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 ...
1
vote
1
answer
619
views
Why is the JNI implementation of my method running slower than pure Java?
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....