Re: Java to C or Java to C++

"Glen Herrmannsfeldt" <gah@ugcs.caltech.edu>
14 Mar 2003 17:35:33 -0500

          From comp.compilers

Related articles
Java to C or Java to C++ alexander1113@email.com (2003-03-14)
Re: Java to C or Java to C++ gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2003-03-14)
| List of all articles for this month |
From: "Glen Herrmannsfeldt" <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 14 Mar 2003 17:35:33 -0500
Organization: AT&T Broadband
References: 03-03-077
Keywords: C++, Java, performance
Posted-Date: 14 Mar 2003 17:35:33 EST

"Alex" <alexander1113@email.com> wrote in message
> Anyone out there know of any current Java to C compilers or Java to
> C++ compilers because the application I am running is slow, well java
> is slow so i would like to convert it to C or C++ without rewriting
> it.


How slow is it? Is it the program, or Java that is slow?


Reasonable Java code is supposed to run, with JIT enabled, about as fast as
C++.


C tends to be a little faster, as there is overhead in memory
allocation/deallocation for OO programming, independent of the language.


I would look at gcj and see if that helps any. Otherwise, your algorithm
may be less efficient than it could be, or it might be using Java
inefficiently.


-- glen


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.