I have developped a java application (no awt involved) for my school research.
It's basically a scientific calculation program, which has huge loops.
Now it's very slow to run it in java/JIT.
I'd like to know if there are some existing free program to translate java
code(or class) to C code(or exe) since rewrite my code in C will take too long.
Has anyone used samilar converter before? Any suggestion is appreciated.
Thanks,
Wei
Roedy Green - 21 Jul 2003 20:42 GMT
>I have developped a java application (no awt involved) for my school research.
>It's basically a scientific calculation program, which has huge loops.
>Now it's very slow to run it in java/JIT.
See http://mindprod.com/nativecompiler.html
jet is free for personal use. see http://mindprod.com/jgloss/jet.html
You could also try the traditional optimising techniques to pull code
out of your innermost loop, unravel the inner most loop, make sure
all values are in local variables for the innermost loop etc.
Did I mention you should spend your time on the innermost loop?
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Roedy Green - 22 Jul 2003 00:34 GMT
>You could also try the traditional optimising techniques to pull code
>out of your innermost loop, unravel the inner most loop, make sure
>all values are in local variables for the innermost loop etc.
see http://mindprod.com/jgloss/optimising.html
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Mykola Rabchevskiy - 22 Jul 2003 18:00 GMT
I experimented with my Java code translation into .exe using JET compiler:
http://www.excelsior-usa.com/jet.html
but this way do not increased productivity (may be because I optimized
Java code before).
> I have developped a java application (no awt involved) for my school research.
> It's basically a scientific calculation program, which has huge loops.
[quoted text clipped - 8 lines]
>
> Wei
Roedy Green - 22 Jul 2003 20:58 GMT
>but this way do not increased productivity (may be because I optimized
>Java code before).
In fact some hand optimisations cause jet to miss its automated ones.
What is your innermost loop? It may be already pared to the bone, but
if you post it someone may think of an idea to pare it further.
The other approach is to use a totally different algorithm. The day I
looked most golden in my career was when I worked for Univac. I was
converting a program for Inland Natural Gas that figured out how to
allocate purchases from various wells based on their contracts. It
used some complex graph theory. I realised that such complex math was
not necessary, and came up with a simpler algorithm. This one
balanced to the penny and ran ten times faster than the old one and
gave the same results. Univac of course received the glory, for having
computer that ran ten times faster and much more accurately than IBM.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
saket - 23 Jul 2003 18:30 GMT
I think it is difficult to conclusively say that .exe would be faster
than .class. It can be opposite sometimes, if you have fairly long
running application that dominates the path length (hence JVM startup
and shutdown costs become neglible). Reason: JIT can apply
optimisations at runtime, compiled .exe only contain static
optimisations (which are applied by javac) - for eg: you can throw away
redudant code at runtime etc.
Try running with other JVMs or latest levels.
http://www-106.ibm.com/developerworks/java/jdk/
> I have developped a java application (no awt involved) for my school research.
> It's basically a scientific calculation program, which has huge loops.
[quoted text clipped - 8 lines]
>
> Wei
Niels Ull Harremo?s - 26 Jul 2003 16:04 GMT
You should definitely try JRockIt (freely available from dev2dev.bea.com).
On a previous project, it doubled our performance.
Roedy Green - 31 Jul 2003 00:13 GMT
On Sat, 26 Jul 2003 17:04:53 +0200, "Niels Ull Harremoës"
<nielsull@adslhome.dk> wrote or quoted :
>You should definitely try JRockIt (freely available from dev2dev.bea.com).
>On a previous project, it doubled our performance.
It is complete JVM optimised for multicpu servers. See
http://mindprod.com/jgloss/jrockit.html
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Bryan E. Boone - 31 Jul 2003 15:38 GMT
I couldn't tell from the fact sheet (tho I didn't read too closely), but
does it support client-side java (ie, swing).?
It said jdk 1.4.1 compliant, but in the same breath it talked about
server-side java.
Hmmmm..
-Bryan
> >You should definitely try JRockIt (freely available from dev2dev.bea.com).
> >On a previous project, it doubled our performance.
[quoted text clipped - 6 lines]
> Coaching, problem solving, economical contract programming.
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.