I presume that by "misdirection", you mean misinformation.
I'd like to see the exact benchmarks first. I can imagine
certain cases where JIT could create such a speed up---e.g. if
all of the test cases involved constants, or in some very
specific cases of chained operations. A cross module optimizer
using profiling output could, at least potentially, also do some
of these optimizations. They probably don't apply universally,
however, and a lot of other cases (perhaps more typical) won't
show a similar speed up.
What is sure, of course, is that there is no cross-module
optimization between Java and C routines called via JNI, where
as all of the JIT compilers do cross-module optimization
(relatively easy, given the environment in which they operate).
And it shouldn't be very difficult at all to design a benchmark
which benefits particularly from such cross-module optimization.
The real difference here, of course, is that the library is
standard in Java, so 1) all Java programmers will know where to
look for it, if they need it, and 2) all Java programmers will
use the same library. Being standard is an advantage. (Whether
it's an important advantage is another question. In the case of
string, I think it definitely is, but in this case, I'm not so
sure.)
--
James Kanze (GABI Software) email:
[email protected]
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34- Hide quoted text -
- Show quoted text -